DOMDocumentTraversal
contains methods that create DOMNodeIterators
and DOMTreeWalkers
to traverse a node and its children in document order (depth first, pre-order traversal, which is equivalent to the order in which the start tags occur in the text representation of the document).
More...
#include <DOMDocumentTraversal.hpp>
Inheritance diagram for xercesc::DOMDocumentTraversal:
Public Member Functions | |
Destructor | |
virtual | ~DOMDocumentTraversal () |
Destructor. | |
Functions introduced in DOM Level 2 | |
virtual DOMNodeIterator * | createNodeIterator (DOMNode *root, unsigned long whatToShow, DOMNodeFilter *filter, bool entityReferenceExpansion)=0 |
Creates a NodeIterator object. | |
virtual DOMTreeWalker * | createTreeWalker (DOMNode *root, unsigned long whatToShow, DOMNodeFilter *filter, bool entityReferenceExpansion)=0 |
Creates a TreeWalker object. | |
Protected Member Functions | |
Hidden constructors | |
DOMDocumentTraversal () |
DOMDocumentTraversal
contains methods that create DOMNodeIterators
and DOMTreeWalkers
to traverse a node and its children in document order (depth first, pre-order traversal, which is equivalent to the order in which the start tags occur in the text representation of the document).
In DOMs which support the Traversal feature, DOMDocumentTraversal
will be implemented by the same objects that implement the DOMDocument interface.
See also the Document Object Model (DOM) Level 2 Traversal and Range Specification.
|
|
|
Destructor.
|
|
Creates a NodeIterator object. (DOM2)
NodeIterators are used to step through a set of nodes, e.g. the set of nodes in a NodeList, the document subtree governed by a particular node, the results of a query, or any other set of nodes. The set of nodes to be iterated is determined by the implementation of the NodeIterator. DOM Level 2 specifies a single NodeIterator implementation for document-order traversal of a document subtree. Instances of these iterators are created by calling
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the
|
|
Creates a TreeWalker object. (DOM2) TreeWalker objects are used to navigate a document tree or subtree using the view of the document defined by its whatToShow flags and any filters that are defined for the TreeWalker. Any function which performs navigation using a TreeWalker will automatically support any view defined by a TreeWalker. Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips all nodes except for DOMText nodes and the root node of a document. In the logical view that results, all text nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the structure of the original document.
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set
|