org.enhydra.xml.lazydom
Class LazyDOMSimpleTraversal

java.lang.Object
  |
  +--org.enhydra.xml.dom.SimpleDOMTraversal
        |
        +--org.enhydra.xml.lazydom.LazyDOMSimpleTraversal

public class LazyDOMSimpleTraversal
extends SimpleDOMTraversal

Simple DOM traverser that calls a handler for every node in the DOM tree. Avoids expansion of LazyDOM tree.


Inner classes inherited from class org.enhydra.xml.dom.SimpleDOMTraversal
SimpleDOMTraversal.Handler
 
Fields inherited from class org.enhydra.xml.dom.SimpleDOMTraversal
fHandler
 
Constructor Summary
LazyDOMSimpleTraversal(SimpleDOMTraversal.Handler handler)
          Constructor.
 
Method Summary
 void processAttributes(Element element)
          Process the attributes of an element.
 void processChildren(Node node)
          Process the children of a node.
 void processDocumentType(Document document)
          Process a DocumentType attribute of a Document node, if it exists.
 void processDocumentTypeContents(DocumentType documentType)
          Process the contents of a DocumentType node, This overrides the SimpleDOMTraversal method and handles switching from instance to template nodes.
protected  void processNode(Node node)
          Processing based on node type.
 void traverse(Node root)
          Traverse a DOM tree or subtree.
 
Methods inherited from class org.enhydra.xml.dom.SimpleDOMTraversal
getTraverser, processAttributes
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyDOMSimpleTraversal

public LazyDOMSimpleTraversal(SimpleDOMTraversal.Handler handler)
Constructor.
Parameters:
handler - The object that will be called to handle each node.
Method Detail

traverse

public void traverse(Node root)
Traverse a DOM tree or subtree.
Overrides:
traverse in class SimpleDOMTraversal
Parameters:
root - The root of the DOM tree or subtree that is to be traversed.

processChildren

public void processChildren(Node node)
Process the children of a node. This overrides the SimpleDOMTraversal method and handles switching from instance to template nodes.
Overrides:
processChildren in class SimpleDOMTraversal

processAttributes

public void processAttributes(Element element)
Process the attributes of an element. This overrides the SimpleDOMTraversal method and handles switching from instance to template nodes.

processDocumentType

public void processDocumentType(Document document)
Process a DocumentType attribute of a Document node, if it exists. This overrides the DOMTraversal method and handles switching from instance to template nodes.
Overrides:
processDocumentType in class SimpleDOMTraversal

processDocumentTypeContents

public void processDocumentTypeContents(DocumentType documentType)
Process the contents of a DocumentType node, This overrides the SimpleDOMTraversal method and handles switching from instance to template nodes.
Overrides:
processDocumentTypeContents in class SimpleDOMTraversal

processNode

protected void processNode(Node node)
Processing based on node type. All nodes go through here. This overrides the DOMTraversal method and handles switching from template back to instance nodes.
Overrides:
processNode in class SimpleDOMTraversal


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.