|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
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. 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.