將節點插入 XML 文件Inserting Nodes into an XML Document

您可藉由插入新節點來修改文件。You can modify the document by inserting new nodes. 節點可以是新建立的、存在於同一文件中,或是從其他文件匯入的。The nodes can be newly created, existing in the same document, or they can be imported from another document. 如需建立新節點的詳細資訊,請參閱在 DOM 中建立新節點For more information about creating new nodes, see Create New Nodes in the DOM. 如需複製現有節點的詳細資訊,請參閱複製現有節點將現有節點從一個文件複製到另一個文件複製文件片段For more information on copying existing nodes, see Copy Existing Nodes, Copying Existing Nodes from One Document to Another, or Copying Document Fragments.

請參閱See also