複製現有節點Copy Existing Nodes

XML 文件物件模型 (DOM) 中有許多方法和屬性可讓您用來選取節點,如 SelectSingleNodeChildNodes[int i]Attributes[int i] 等。There are many methods and properties in the XML Document Object Model (DOM)you can use to select a node, such as SelectSingleNode, ChildNodes[int i], Attributes[int i]. 一旦選取節點之後,您可以使用處理特殊節點型別的其中一種插入方法,將它插入至樹狀。Once the node is selected, you can insert it into the tree using one of the insert methods that work for that particular node type. 將節點插入樹狀結構的唯一限制是,文件在節點插入後仍必須保持正確格式。The only restriction to inserting a node into the tree is that the document must still be well-formed after the node is inserted. 現有節點插入 DOM 樹狀時,即會從它的原始位置移除,然後加入其目標位置中。When an existing node is inserted into the DOM tree, it is removed from its original position and added to its target position.

另請參閱See also