Now on IBM developerWorks: Tip: Using a DOM NodeFilter -- XML's DOM Level 2 Traversal module provides two new objects, the TreeWalker and the NodeIterator, which simplify the process of navigating a Document. More than that, the module defines a NodeFilter, which can be used to programmatically control what Nodes are visible to the TreeWalker or NodeFilter. This tip shows you how to create a NodeFilter as well as a Traversal object that uses it.
Technorati tags:
Comments