NodeIterators are used to step through a set of nodes, e.g.
the set of nodes in a NodeList, the document subtree
governed by a particular Node, the results of a query, or
any other set of nodes. The set of nodes to be iterated is determined by
the implementation of the NodeIterator. DOM Level 2
specifies a single NodeIterator implementation for
document-order traversal of a document subtree. Instances of these
NodeIterators are created by calling
DocumentTraversal.createNodeIterator().
See also the Document Object Model (DOM) Level 2 Traversal and Range Specification.
| Modifier and Type | Method and Description |
|---|---|
| public void | detach()
Detaches the |
| public boolean | getExpandEntityReferences()
The value of this flag determines whether the children of entity
reference nodes are visible to the |
| public NodeFilter | |
| public Node | |
| public int | |
| public Node | Returns: The nextNode in the set being iterated over, or
null if there are no more members in that set.Returns the next node in the set and advances the position of the
|
| public Node | Returns: The previousNode in the set being iterated over,
or null if there are no more members in that set.Returns the previous node in the set and moves the position of the
|
| detach | back to summary |
|---|---|
| public void detach() Detaches the | |
| getExpandEntityReferences | back to summary |
|---|---|
| public boolean getExpandEntityReferences() The value of this flag determines whether the children of entity
reference nodes are visible to the | |
| getFilter | back to summary |
|---|---|
| public NodeFilter getFilter() The | |
| getRoot | back to summary |
|---|---|
| public Node getRoot() The root node of the | |
| getWhatToShow | back to summary |
|---|---|
| public int getWhatToShow() This attribute determines which node types are presented via the
| |
| nextNode | back to summary |
|---|---|
| public Node nextNode() throws DOMException Returns the next node in the set and advances the position of the
| |
| previousNode | back to summary |
|---|---|
| public Node previousNode() throws DOMException Returns the previous node in the set and moves the position of the
| |