public class NodeIteratorImpl
extends java.lang.Object
implements org.w3c.dom.traversal.NodeIterator
The whatToShow and filter functionality is implemented as expected.
This class also has method removeNode to enable iterator "fix-up" on DOM remove. It is expected that the DOM implementation call removeNode right before the actual DOM transformation. If not called by the DOM, the client could call it before doing the removal.
| Constructor and Description | 
|---|
| NodeIteratorImpl(DocumentImpl document,
                org.w3c.dom.Node root,
                int whatToShow,
                org.w3c.dom.traversal.NodeFilter nodeFilter,
                boolean entityReferenceExpansion)Public constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | detach()Detaches the  NodeIteratorfrom the set which it iterated 
 over, releasing any computational resources and placing theNodeIteratorin the INVALID state. | 
| boolean | getExpandEntityReferences()Return whether children entity references are included in the iterator. | 
| org.w3c.dom.traversal.NodeFilter | getFilter()Return the filter | 
| org.w3c.dom.Node | getRoot()The root node of the  NodeIterator, as specified when it 
 was created. | 
| int | getWhatToShow()Return the whatToShow value | 
| org.w3c.dom.Node | nextNode()Return the next Node in the Iterator. | 
| org.w3c.dom.Node | previousNode()Return the previous Node in the Iterator. | 
| void | removeNode(org.w3c.dom.Node node)Fix-up the iterator on a remove. | 
public NodeIteratorImpl(DocumentImpl document, org.w3c.dom.Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter nodeFilter, boolean entityReferenceExpansion)
public org.w3c.dom.Node getRoot()
org.w3c.dom.traversal.NodeIteratorNodeIterator, as specified when it 
 was created.getRoot in interface org.w3c.dom.traversal.NodeIteratorpublic int getWhatToShow()
getWhatToShow in interface org.w3c.dom.traversal.NodeIteratorpublic org.w3c.dom.traversal.NodeFilter getFilter()
getFilter in interface org.w3c.dom.traversal.NodeIteratorpublic boolean getExpandEntityReferences()
getExpandEntityReferences in interface org.w3c.dom.traversal.NodeIteratorpublic org.w3c.dom.Node nextNode()
nextNode in interface org.w3c.dom.traversal.NodeIteratorNode in the set being iterated over, or 
   null if there are no more members in that set.public org.w3c.dom.Node previousNode()
previousNode in interface org.w3c.dom.traversal.NodeIteratorNode in the set being iterated over, 
   or null if there are no more members in that set.public void removeNode(org.w3c.dom.Node node)
public void detach()
org.w3c.dom.traversal.NodeIteratorNodeIterator from the set which it iterated 
 over, releasing any computational resources and placing the 
 NodeIterator in the INVALID state. After 
 detach has been invoked, calls to nextNode 
 or previousNode will raise the exception 
 INVALID_STATE_ERR.detach in interface org.w3c.dom.traversal.NodeIteratorCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.