XML for Java Compatibility API 2.0.15

com.ibm.xml.parser
Class TreeTraversal

java.lang.Object
  |
  +--com.ibm.xml.parser.TreeTraversal
Direct Known Subclasses:
NonRecursivePreorderTreeTraversal, RecursivePreorderTreeTraversal

public abstract class TreeTraversal
extends java.lang.Object

TreeTraversal defines the document object tree traversal mechanisms for used by the visitor design pattern.

Version:
Revision: 94 1.3 src/com/ibm/xml/parser/TreeTraversal.java, parser, xml4j2, xml4j2_0_15
See Also:
NonRecursivePreorderTreeTraversal

Constructor Summary
TreeTraversal(Visitor visitor)
          Constructor.
 
Method Summary
 Visitor getVisitor()
          Returns the Visitor operation currently active in this tree traversal.
abstract  void traverse(org.w3c.dom.Node startNode)
          Traverses the document object tree at the specified startNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeTraversal

public TreeTraversal(Visitor visitor)
Constructor.
Parameters:
visitor - The implemention of the Visitor operation (toXMLString, digest, ...)
See Also:
Visitor
Method Detail

getVisitor

public Visitor getVisitor()
Returns the Visitor operation currently active in this tree traversal.
Returns:
visitor The implemention of the Visitor operation (toXMLString, digest, ...)
See Also:
Visitor

traverse

public abstract void traverse(org.w3c.dom.Node startNode)
                       throws java.lang.Exception
Traverses the document object tree at the specified startNode.
Parameters:
startNode - The starting point to begin traversing the document object tree.
Throws:
java.lang.Exception - Thrown if the tree could not be traversed.
See Also:
NonRecursivePreorderTreeTraversal.traverse(org.w3c.dom.Node)

XML for Java Compatibility API 2.0.15