org.enhydra.xml.lazydom
Class LazyDOMTraversal
java.lang.Object
|
+--org.enhydra.xml.dom.DOMTraversal
|
+--org.enhydra.xml.lazydom.LazyDOMTraversal
- public class LazyDOMTraversal
- extends DOMTraversal
Lazy DOM traversal class, calling handler methods for each node based on if
they are expanded or template nodes. This only works if the traversal
starts with a node of the instance LazyDocument. Template LazyDocuments
will not work with this class and should be traversed normally.
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LazyDOMTraversal
public LazyDOMTraversal(DOMTraversal.Handler handler,
int options)
- Constructor.
- Parameters:
handler
- The object that will be called to handle each
node.options
- Bit set of the option flags.
LazyDOMTraversal
public LazyDOMTraversal(int options)
- Default constructor, set handler later.
traverse
public void traverse(Node root)
- Traverse a DOM tree or subtree.
- Overrides:
traverse
in class DOMTraversal
- 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 DOMTraversal method
and handles switching from instance to template nodes.
- Overrides:
processChildren
in class DOMTraversal
processAttributes
public void processAttributes(Element element)
- Process the attributes of an element. This overrides the DOMTraversal
method and handles switching from instance to template nodes.
- Overrides:
processAttributes
in class DOMTraversal
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 DOMTraversal
processDocumentTypeContents
public void processDocumentTypeContents(DocumentType documentType)
- Process the contents of a DocumentType node. This overrides the
DOMTraversal method and handles switching from instance to template
nodes.
- Overrides:
processDocumentTypeContents
in class DOMTraversal
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 DOMTraversal
Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.