Package org.htmlunit.html
Class DomNodeIterator
- java.lang.Object
-
- org.htmlunit.html.DomNodeIterator
-
- All Implemented Interfaces:
org.w3c.dom.traversal.NodeIterator
public class DomNodeIterator extends java.lang.Object implements org.w3c.dom.traversal.NodeIterator
An implementation ofNodeIterator
.
-
-
Constructor Summary
Constructors Constructor Description DomNodeIterator(DomNode root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean expandEntityReferences)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detach()
boolean
getExpandEntityReferences()
org.w3c.dom.traversal.NodeFilter
getFilter()
DomNode
getRoot()
int
getWhatToShow()
boolean
isPointerBeforeReferenceNode()
Returns whether theNodeIterator
is anchored before, or after the node.DomNode
nextNode()
DomNode
previousNode()
-
-
-
Constructor Detail
-
DomNodeIterator
public DomNodeIterator(DomNode root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean expandEntityReferences)
Creates a new instance.- Parameters:
root
- The root node at which to begin theNodeIterator
's traversalwhatToShow
- an optional int representing a bitmask created by combining the constant properties ofNodeFilter
expandEntityReferences
- If false, the contents of EntityReference nodes are not present in the logical view.filter
- an object implementing theNodeFilter
interface
-
-
Method Detail
-
getRoot
public DomNode getRoot()
- Specified by:
getRoot
in interfaceorg.w3c.dom.traversal.NodeIterator
-
getWhatToShow
public int getWhatToShow()
- Specified by:
getWhatToShow
in interfaceorg.w3c.dom.traversal.NodeIterator
-
getExpandEntityReferences
public boolean getExpandEntityReferences()
- Specified by:
getExpandEntityReferences
in interfaceorg.w3c.dom.traversal.NodeIterator
-
getFilter
public org.w3c.dom.traversal.NodeFilter getFilter()
- Specified by:
getFilter
in interfaceorg.w3c.dom.traversal.NodeIterator
-
isPointerBeforeReferenceNode
public boolean isPointerBeforeReferenceNode()
Returns whether theNodeIterator
is anchored before, or after the node.- Returns:
- whether it is anchored before or after the node
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.w3c.dom.traversal.NodeIterator
-
nextNode
public DomNode nextNode()
- Specified by:
nextNode
in interfaceorg.w3c.dom.traversal.NodeIterator
-
previousNode
public DomNode previousNode()
- Specified by:
previousNode
in interfaceorg.w3c.dom.traversal.NodeIterator
-
-