java命名空间javax.xml.transform.dom类domresult成员方法:
domresult定义参考
本文导语:
domresult
public domresult(node node,
node nextsibling,
string systemid)
使用 dom 节点创建新输出目标,此目标指定了子节点,其中结果节点为指定 system id 且应该插入到该子节点之前。
实际上,node 和 nextsibling 应...
domresult
public domresult(node node,
node nextsibling,
string systemid)
使用 dom 节点创建新输出目标,此目标指定了子节点,其中结果节点为指定 system id 且应该插入到该子节点之前。
实际上,node 和 nextsibling 应该是 document 节点、documentfragment 节点或 element 节点。换句话说,应该是接受子级的节点。
使用 nextsibling 来指定应该插入的结果节点之后的子节点。如果 nextsibling 不是 node 的兄弟结点,则抛出 illegalargumentexception。如果 node 为 null 且 nextsibling 不为 null,则抛出 illegalargumentexception。如果 nextsibling 为 null,则行为将与调用 domresult(node node, string systemid) 相同,即将结果节点追加为指定节点的最后一个子节点,并使用指定 system id。
- 参数:
node - 将包含结果树的 dom 节点。nextsibling - 应该插入的结果节点之后的子节点。systemid - 可与此节点关联使用的系统标识符。
- 抛出:
illegalargumentexception - 如果 nextsibling 不是 node 的兄弟节点,或者 node 为 null 且 nextsibling 不为 null。- 从以下版本开始:
- 1.5
setnode
public void setnode(node node)
设置将包含结果 dom 树的节点。
实际上,该节点应该是 document 节点、documentfragment 节点或 element 节点。换句话说,应该是接受子级的节点。
如果 nextsibling 不为 null 且 node 不是 nextsibling 的父级,则抛出 illegalstateexception。如果 node 为 null 且 nextsibling 不为 null,则抛出 illegalstateexception。
- 参数:
node - 转换将被追加到的节点。
- 抛出:
illegalstateexception - 如果 nextsibling 不为 null 且 nextsibling 不是 node 的子节点,或者 node 为 null 且 nextsibling 不为 null。