Object: NodeIterator
The NodeIterator object enables you to navigate up and down through a flat representation of the document tree. This object is similar to the TreeWalker objects, except that TreeWalker presents nodes in a tree-oriented view, rather than the list view presented by NodeIterator.
Create a NodeIterator using Document.createNodeIterator().
NodeIterator properties
|
Property name |
Type |
Description |
Status |
Support level |
Availability |
|---|---|---|---|---|---|
|
boolean |
Returns whether or not the NodeIterator expands the entity references it encounters as it traverses the document. |
read only |
DOM 2 Traversal |
4.6 or later |
|
|
Returns the NodeFilter used to filter nodes for traversal. |
read only |
DOM 2 Traversal |
4.6 or later |
||
|
Returns the Node at which the NodeIterator begins traversing the document. |
read only |
DOM 2 Traversal |
4.6 or later |
||
|
unsigned long |
Returns which node types are presented by the NodeIterator, represented by one or more NodeFilter constants. Multiple values may be specified using a bitwise OR. |
read only |
DOM 2 Traversal |
4.6 or later |
NodeIterator methods
|
Method name |
Description |
Support level |
Availability |
|---|---|---|---|
|
Detaches the NodeIterator from the set which it iterated over. |
DOM 2 Traversal |
4.6 or later |
|
|
Moves the NodeIterator to the next visible Node in the document order, relative to the current node. |
DOM 2 Traversal |
4.6 or later |
|
|
Moves the NodeIterator to the previous visible Node in the document order, relative to the current node. |
DOM 2 Traversal |
4.6 or later |