Table 2-27 summarizes the methods available through TreeWalker
interface.
Table 2-27 Summary of TreeWalker Methods; Dom Package
Function | Summary |
---|---|
Attach this tree walker to another context. |
|
Get the first child of the current node. |
|
Get the last child of the current node. |
|
Get the next node. |
|
Get the next sibling node. |
|
Get the parent of the current node. |
|
Get the previous node. |
|
Get the previous sibling node. |
Attaches this tree walker to the context associated with a given node reference
void adjustCtx( NodeRef< Node>& nref);
Parameter | Description |
---|---|
nref |
reference to provide the context |
Get the first child of the current node.
Node* firstChild();
(Node*)
pointer to first child node
Get the last child of the current node.
Node* lastChild();
(Node*)
pointer to last child node
Get the next node.
Node* nextNode();
(Node*)
pointer to the next node
Get the next sibling node.
Node* nextSibling();
(Node*)
pointer to the next sibling node
Get the parent of the current node.
Node* parentNode();
(Node*)
pointer to the parent node
Get the previous node.
Node* previousNode();
(Node*)
pointer to previous node
Get the previous sibling node.
Node* previousSibling();
(Node*)
pointer to the previous sibling node