public class DomTreeWalker extends Object implements org.w3c.dom.traversal.TreeWalker
TreeWalker
backed by HtmlDomTreeWalker
.Constructor and Description |
---|
DomTreeWalker(DomNode root,
int whatToShow,
org.w3c.dom.traversal.NodeFilter filter,
boolean expandEntityReferences)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
DomNode |
firstChild() |
DomNode |
getCurrentNode() |
boolean |
getExpandEntityReferences() |
org.w3c.dom.traversal.NodeFilter |
getFilter() |
DomNode |
getRoot() |
int |
getWhatToShow() |
DomNode |
lastChild() |
DomNode |
nextNode() |
DomNode |
nextSibling() |
DomNode |
parentNode() |
DomNode |
previousNode() |
DomNode |
previousSibling() |
void |
setCurrentNode(Node currentNode) |
public DomTreeWalker(DomNode root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean expandEntityReferences) throws DOMException
root
- The root node of the TreeWalker. Must not be
null
.whatToShow
- Flag specifying which types of nodes appear in the
logical view of the TreeWalker. See NodeFilter
for the
set of possible Show_ values.filter
- The NodeFilter
to be used with this TreeWalker,
or null
to indicate no filter.expandEntityReferences
- If false, the contents of
EntityReference nodes are not present in the logical view.DOMException
- on attempt to create a TreeWalker with a root that
is null
.public DomNode getRoot()
getRoot
in interface org.w3c.dom.traversal.TreeWalker
public int getWhatToShow()
getWhatToShow
in interface org.w3c.dom.traversal.TreeWalker
public org.w3c.dom.traversal.NodeFilter getFilter()
getFilter
in interface org.w3c.dom.traversal.TreeWalker
public boolean getExpandEntityReferences()
getExpandEntityReferences
in interface org.w3c.dom.traversal.TreeWalker
public DomNode getCurrentNode()
getCurrentNode
in interface org.w3c.dom.traversal.TreeWalker
public void setCurrentNode(Node currentNode) throws DOMException
setCurrentNode
in interface org.w3c.dom.traversal.TreeWalker
DOMException
public DomNode nextNode()
nextNode
in interface org.w3c.dom.traversal.TreeWalker
public DomNode nextSibling()
nextSibling
in interface org.w3c.dom.traversal.TreeWalker
public DomNode parentNode()
parentNode
in interface org.w3c.dom.traversal.TreeWalker
public DomNode previousSibling()
previousSibling
in interface org.w3c.dom.traversal.TreeWalker
public DomNode lastChild()
lastChild
in interface org.w3c.dom.traversal.TreeWalker
public DomNode previousNode()
previousNode
in interface org.w3c.dom.traversal.TreeWalker
public DomNode firstChild()
firstChild
in interface org.w3c.dom.traversal.TreeWalker
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.