org.apache.batik.dom.traversal
public class DOMTreeWalker extends Object implements TreeWalker
Field Summary | |
---|---|
protected Node | currentNode
The current node. |
protected boolean | expandEntityReferences
Whether the children of entity reference nodes are visible
to the iterator. |
protected NodeFilter | filter
The NodeFilter used to screen nodes. |
protected Node | root
The root node. |
protected int | whatToShow
Which node types are presented via the iterator. |
Constructor Summary | |
---|---|
DOMTreeWalker(Node n, int what, NodeFilter nf, boolean exp)
Creates a new TreeWalker object. |
Method Summary | |
---|---|
protected short | acceptNode(Node n)
Whether or not the given node is accepted by this tree walker. |
Node | firstChild()
DOM: Implements TreeWalker#firstChild(). |
protected Node | firstChild(Node n)
Returns the first child of the given node. |
Node | getCurrentNode()
DOM: Implements TreeWalker#getCurrentNode(). |
boolean | getExpandEntityReferences()
DOM: Implements TreeWalker#getExpandEntityReferences(). |
NodeFilter | getFilter()
DOM: Implements TreeWalker#getFilter(). |
Node | getRoot()
DOM: Implements TreeWalker#getRoot(). |
int | getWhatToShow()
DOM: Implements TreeWalker#getWhatToShow(). |
Node | lastChild()
DOM: Implements TreeWalker#lastChild(). |
protected Node | lastChild(Node n)
Returns the last child of the given node. |
Node | nextNode()
DOM: Implements TreeWalker#nextNode(). |
Node | nextSibling()
DOM: Implements TreeWalker#nextSibling(). |
protected Node | nextSibling(Node n, Node root)
Returns the next sibling of the given node. |
Node | parentNode()
DOM: Implements TreeWalker#parentNode(). |
protected Node | parentNode(Node n)
Returns the parent node of the given node. |
Node | previousNode()
DOM: Implements TreeWalker#previousNode(). |
Node | previousSibling()
DOM: Implements TreeWalker#previousSibling(). |
protected Node | previousSibling(Node n, Node root)
Returns the previous sibling of the given node. |
void | setCurrentNode(Node n)
DOM: Implements TreeWalker#setCurrentNode(Node). |
Parameters: n The root node. what Which node types are presented via the iterator. nf The NodeFilter used to screen nodes. exp Whether the children of entity reference nodes are visible to the tree walker.