除了可以添加、删除或修改元素之外,您还可以通过操纵指向元素或节点的指针,将元素移动到该层次结构中的另一位置上。
In addition to be able to add, remove, or modify the element, you could also move it to another location in the hierarchy by manipulating the Pointers to the element or node.
在找到需要删除的节点之后,通过一行命令即可将其从结构中删除,但并没有从文档中删除。
Once you have found the node that needs to be removed, a single command removes it from the structure, but not the document.
新的过滤器 API 使您可以在解析期间通过请求解析器接受、忽略一个节点及其子节点或者将它们从产生的树中删除,来检查和修改文档的结构。
The new filter API lets you examine and modify a document’s structure during parsing by asking a parser to accept, skip, or remove a node and its children from the resulting tree.
应用推荐