|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 iterators are created by calling DocumentTraversal.createNodeIterator().
Method Summary | |
void |
detach()
Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. |
boolean |
getExpandEntityReferences()
The value of this flag determines whether the children of entity reference nodes are visible to the iterator. |
NodeFilter |
getFilter()
The filter used to screen nodes. |
Node |
getRoot()
The root node of the Iterator, as specified when it was created. |
int |
getWhatToShow()
This attribute determines which node types are presented via the iterator. |
Node |
nextNode()
Returns the next node in the set and advances the position of the iterator in the set. |
Node |
previousNode()
Returns the previous node in the set and moves the position of the iterator backwards in the set. |
Method Detail |
public Node getRoot()
public int getWhatToShow()
NodeFilter
interface.public NodeFilter getFilter()
public boolean getExpandEntityReferences()
public Node nextNode() throws DOMException
Node
in the set being iterated over, or
null
if there are no more members in that set.detach
method was invoked.public Node previousNode() throws DOMException
Node
in the set being iterated over,
ornull
if there are no more members in that set.detach
method was invoked.public void detach()
detach
has been invoked, calls to
nextNode
orpreviousNode
will raise the
exception INVALID_STATE_ERR.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |