< prev index next >

jaxp/src/java.xml/share/classes/org/w3c/dom/traversal/NodeIterator.java

Print this page




  38  * PURPOSE.
  39  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  40  */
  41 
  42 package org.w3c.dom.traversal;
  43 
  44 import org.w3c.dom.Node;
  45 import org.w3c.dom.DOMException;
  46 
  47 /**
  48  * <code>NodeIterators</code> are used to step through a set of nodes, e.g.
  49  * the set of nodes in a <code>NodeList</code>, the document subtree
  50  * governed by a particular <code>Node</code>, the results of a query, or
  51  * any other set of nodes. The set of nodes to be iterated is determined by
  52  * the implementation of the <code>NodeIterator</code>. DOM Level 2
  53  * specifies a single <code>NodeIterator</code> implementation for
  54  * document-order traversal of a document subtree. Instances of these
  55  * <code>NodeIterators</code> are created by calling
  56  * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
  57  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
  58  * @since 1.9, DOM Level 2
  59  */
  60 public interface NodeIterator {
  61     /**
  62      * The root node of the <code>NodeIterator</code>, as specified when it
  63      * was created.
  64      */
  65     public Node getRoot();
  66 
  67     /**
  68      * This attribute determines which node types are presented via the
  69      * <code>NodeIterator</code>. The available set of constants is defined
  70      * in the <code>NodeFilter</code> interface.  Nodes not accepted by
  71      * <code>whatToShow</code> will be skipped, but their children may still
  72      * be considered. Note that this skip takes precedence over the filter,
  73      * if any.
  74      */
  75     public int getWhatToShow();
  76 
  77     /**
  78      * The <code>NodeFilter</code> used to screen nodes.




  38  * PURPOSE.
  39  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  40  */
  41 
  42 package org.w3c.dom.traversal;
  43 
  44 import org.w3c.dom.Node;
  45 import org.w3c.dom.DOMException;
  46 
  47 /**
  48  * <code>NodeIterators</code> are used to step through a set of nodes, e.g.
  49  * the set of nodes in a <code>NodeList</code>, the document subtree
  50  * governed by a particular <code>Node</code>, the results of a query, or
  51  * any other set of nodes. The set of nodes to be iterated is determined by
  52  * the implementation of the <code>NodeIterator</code>. DOM Level 2
  53  * specifies a single <code>NodeIterator</code> implementation for
  54  * document-order traversal of a document subtree. Instances of these
  55  * <code>NodeIterators</code> are created by calling
  56  * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
  57  * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
  58  * @since 9, DOM Level 2
  59  */
  60 public interface NodeIterator {
  61     /**
  62      * The root node of the <code>NodeIterator</code>, as specified when it
  63      * was created.
  64      */
  65     public Node getRoot();
  66 
  67     /**
  68      * This attribute determines which node types are presented via the
  69      * <code>NodeIterator</code>. The available set of constants is defined
  70      * in the <code>NodeFilter</code> interface.  Nodes not accepted by
  71      * <code>whatToShow</code> will be skipped, but their children may still
  72      * be considered. Note that this skip takes precedence over the filter,
  73      * if any.
  74      */
  75     public int getWhatToShow();
  76 
  77     /**
  78      * The <code>NodeFilter</code> used to screen nodes.


< prev index next >