com.aspose.html.dom.traversal

Interface INodeIterator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void detach()
      Detaches the NodeIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.
      boolean getPointerBeforeReferenceNode()
      The value of this flag determines whether the children of entity reference nodes are visible to the iterator.
      Node getReferenceNode()
      The current reference node.
      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 NodeIterator backwards in the set.
      • Methods inherited from interface com.aspose.ms.System.IDisposable

        dispose
    • Method Detail

      • getReferenceNode

        @DOMNameAttribute(name="referenceNode")
        Node getReferenceNode()

        The current reference node.

        Value: The reference node.
      • getPointerBeforeReferenceNode

        @DOMNameAttribute(name="pointerBeforeReferenceNode")
        boolean getPointerBeforeReferenceNode()

        The value of this flag determines whether the children of entity reference nodes are visible to the iterator. If false, they and their descendants will be rejected. Note that this rejection takes precedence over whatToShow and the filter. Also note that this is currently the only situation where NodeIterators may reject a complete subtree rather than skipping individual nodes. To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set expandEntityReferences to true when creating the iterator. To produce a view of the document that has entity reference nodes but no entity expansion, use the whatToShow flags to show the entity reference node and set expandEntityReferences to false.

        Value: true if [expand entity references]; otherwise, false.
      • nextNode

        @DOMNameAttribute(name="nextNode")
        Node nextNode()

        Returns the next node in the set and advances the position of the iterator in the set. After a NodeIterator is created, the first call to nextNode() returns the first node in the set.

        Returns:
        The next Node in the set being iterated over, or null if there are no more members in that set.
        Throws:
        DOMException - INVALID_STATE_ERR: Raised if this method is called after the detach method was invoked.
      • previousNode

        @DOMNameAttribute(name="previousNode")
        Node previousNode()

        Returns the previous node in the set and moves the position of the NodeIterator backwards in the set.

        Returns:
        The previous Node in the set being iterated over, or null if there are no more members in that set.
        Throws:
        DOMException - INVALID_STATE_ERR: Raised if this method is called after the detach method was invoked.
      • detach

        @DOMNameAttribute(name="detach")
        void detach()

        Detaches the NodeIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise the exception INVALID_STATE_ERR.