移除 XML 文档中的节点、内容和值Removing Nodes, Content, and Values from an XML Document

XML 文档对象模型 (DOM) 在内存中之后,可以移除树中的节点,或移除特定节点类型中的内容和值。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. 若要了解如何从文档中删除叶节点或整个节点子树,请参阅从 DOM 中删除节点For information on how to remove a leaf node or entire node subtree from a document, see Removing Nodes from the DOM. 若要了解如何删除元素属性,请参阅删除 DOM 中元素节点的属性For information on how to remove attributes on an element, see Removing Attributes from an Element Node in the DOM. 若要了解如何删除节点内容但将节点保留在树中,请参阅删除 DOM 中的节点内容For information on removing content of a node but leaving the node in the tree, see Removing Node Content in the DOM.

另请参阅See also