Enhydra 3.1 API

org.apache.xalan.xpath.xml
Class TreeWalker

java.lang.Object
  |
  +--org.apache.xalan.xpath.xml.TreeWalker

public class TreeWalker
extends java.lang.Object

This class does a pre-order walk of the DOM tree, calling the FormatterListener interface as it goes.


Constructor Summary
TreeWalker(DocumentHandler formatterListener)
          Constructor.
 
Method Summary
protected  void endNode(Node node)
           
 DocumentHandler getFormatterListener()
          Get the DocumentHandler used for the tree walk.
protected  void startNode(Node node)
           
 void traverse(Node pos)
          Perform a pre-order traversal non-recursive style.
 void traverse(Node pos, Node top)
          Perform a pre-order traversal non-recursive style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeWalker

public TreeWalker(DocumentHandler formatterListener)
Constructor.
Parameters:
formatterListener - The implemention of the FormatterListener operation (toXMLString, digest, ...)
Method Detail

getFormatterListener

public DocumentHandler getFormatterListener()
Get the DocumentHandler used for the tree walk.

traverse

public void traverse(Node pos)
              throws SAXException
Perform a pre-order traversal non-recursive style.

traverse

public void traverse(Node pos,
                     Node top)
              throws SAXException
Perform a pre-order traversal non-recursive style.

startNode

protected void startNode(Node node)
                  throws SAXException

endNode

protected void endNode(Node node)
                throws SAXException

Enhydra 3.1 API