DOMTreeWalker
objects are used to navigate a document tree or subtree using the view of the document defined by their whatToShow
flags and filter (if any).
More...
#include <DOMTreeWalker.hpp>
Public Member Functions | |
Destructor | |
virtual | ~DOMTreeWalker () |
Destructor. | |
Functions introduced in DOM Level 2 | |
virtual DOMNode * | getRoot ()=0 |
The root node of the DOMTreeWalker , as specified when it was created. | |
virtual DOMNodeFilter::ShowType | getWhatToShow ()=0 |
This attribute determines which node types are presented via the DOMTreeWalker . | |
virtual DOMNodeFilter * | getFilter ()=0 |
Return The filter used to screen nodes. | |
virtual bool | getExpandEntityReferences ()=0 |
The value of this flag determines whether the children of entity reference nodes are visible to the DOMTreeWalker . | |
virtual DOMNode * | getCurrentNode ()=0 |
Return the node at which the DOMTreeWalker is currently positioned. | |
virtual DOMNode * | parentNode ()=0 |
Moves to and returns the closest visible ancestor node of the current node. | |
virtual DOMNode * | firstChild ()=0 |
Moves the DOMTreeWalker to the first visible child of the current node, and returns the new node. | |
virtual DOMNode * | lastChild ()=0 |
Moves the DOMTreeWalker to the last visible child of the current node, and returns the new node. | |
virtual DOMNode * | previousSibling ()=0 |
Moves the DOMTreeWalker to the previous sibling of the current node, and returns the new node. | |
virtual DOMNode * | nextSibling ()=0 |
Moves the DOMTreeWalker to the next sibling of the current node, and returns the new node. | |
virtual DOMNode * | previousNode ()=0 |
Moves the DOMTreeWalker to the previous visible node in document order relative to the current node, and returns the new node. | |
virtual DOMNode * | nextNode ()=0 |
Moves the DOMTreeWalker to the next visible node in document order relative to the current node, and returns the new node. | |
virtual void | setCurrentNode (DOMNode *currentNode)=0 |
The node at which the DOMTreeWalker is currently positioned. | |
Non-standard Extension | |
virtual void | release ()=0 |
Called to indicate that this TreeWalker is no longer in use and that the implementation may relinquish any resources associated with it. | |
Protected Member Functions | |
Hidden constructors | |
DOMTreeWalker () | |
DOMTreeWalker (const DOMTreeWalker &) |
DOMTreeWalker
objects are used to navigate a document tree or subtree using the view of the document defined by their whatToShow
flags and filter (if any).
Any function which performs navigation using a DOMTreeWalker
will automatically support any view defined by a DOMTreeWalker
.
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 DOMTreeWalker
view may be children of different, widely separated nodes in the original view. For instance, consider a DOMNodeFilter
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.
See also the Document Object Model (DOM) Level 2 Traversal and Range Specification.
|
|
|
|
|
Destructor.
|
|
Moves the
If the current node has no visible children, returns
|
|
Return the node at which the DOMTreeWalker is currently positioned.
|
|
The value of this flag determines whether the children of entity reference nodes are visible to the
If false, these children and their descendants will be rejected. Note that this rejection takes precedence over
|
|
Return The filter used to screen nodes.
|
|
The
|
|
This attribute determines which node types are presented via the
The available set of constants is defined in the
|
|
Moves the
If the current node has no visible children, returns
|
|
Moves the
If the current node has no next node, or if the search for nextNode attempts to step upward from the
|
|
Moves the
If the current node has no visible next sibling, returns
|
|
Moves to and returns the closest visible ancestor node of the current node.
If the search for
|
|
Moves the
If the current node has no previous node, or if the search for
|
|
Moves the
If the current node has no visible previous sibling, returns
|
|
Called to indicate that this TreeWalker is no longer in use and that the implementation may relinquish any resources associated with it. Access to a released object will lead to unexpected result. |
|
The node at which the
|