|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|
Removing Nodes, Content, and Values from an XML Document
Once an XML Document Object Model (DOM) is in memory, you can remove nodes from the tree, or remove content and values from certain node types. For information on how to remove a leaf node or entire node subtree from a document, see Removing Nodes from the DOM. For information on how to remove attributes on an element, see Removing Attributes from an Element Node in the DOM. For information on removing content of a node but leaving the node in the tree, see Removing Node Content in the DOM.