Table 15-27 summarizes the methods of available through TreeWalker
interface.
Table 15-27 Summary of TreeWalker Methods; Dom Package
Function | Summary |
---|---|
adjustCtx
|
Attach this tree walker to another context. |
firstChild
|
Get the first child of the current node. |
lastChild
|
Get the last child of the current node. |
nextNode
|
Get the next node. |
nextSibling
|
Get the next sibling node. |
parentNode
|
Get the parent of the current node. |
previousNode
|
Get the previous node. |
previousSibling
|
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