| java.lang.Object org.apache.xml.dtm.ref.DTMTreeWalker
All known Subclasses: org.apache.xalan.transformer.TreeWalker2Result,
DTMTreeWalker | public class DTMTreeWalker (Code) | | This class does a pre-order walk of the DTM tree, calling a ContentHandler
interface as it goes. As such, it's more like the Visitor design pattern
than like the DOM's TreeWalker.
I think normally this class should not be needed, because
of DTM#dispatchToEvents.
|
Method Summary | |
protected void | endNode(int node) | public ContentHandler | getcontentHandler() Get the ContentHandler used for the tree walk. | public void | setDTM(DTM dtm) Set the DTM to be traversed. | public void | setcontentHandler(ContentHandler ch) Set the ContentHandler used for the tree walk. | protected void | startNode(int node) | public void | traverse(int pos) Perform a non-recursive pre-order/post-order traversal,
operating as a Visitor. | public void | traverse(int pos, int top) Perform a non-recursive pre-order/post-order traversal,
operating as a Visitor. |
m_dtm | protected DTM m_dtm(Code) | | DomHelper for this TreeWalker
|
nextIsRaw | boolean nextIsRaw(Code) | | Flag indicating whether following text to be processed is raw text
|
DTMTreeWalker | public DTMTreeWalker()(Code) | | Constructor.
|
DTMTreeWalker | public DTMTreeWalker(ContentHandler contentHandler, DTM dtm)(Code) | | Constructor.
Parameters: contentHandler - The implemention of thecontentHandler operation (toXMLString, digest, ...) |
getcontentHandler | public ContentHandler getcontentHandler()(Code) | | Get the ContentHandler used for the tree walk.
the ContentHandler used for the tree walk |
setDTM | public void setDTM(DTM dtm)(Code) | | Set the DTM to be traversed.
Parameters: dtm - The Document Table Model to be used. |
setcontentHandler | public void setcontentHandler(ContentHandler ch)(Code) | | Set the ContentHandler used for the tree walk.
Parameters: ch - the ContentHandler to be the result of the tree walk. |
traverse | public void traverse(int pos) throws org.xml.sax.SAXException(Code) | | Perform a non-recursive pre-order/post-order traversal,
operating as a Visitor. startNode (preorder) and endNode
(postorder) are invoked for each node as we traverse over them,
with the result that the node is written out to m_contentHandler.
Parameters: pos - Node in the tree at which to start (and end) traversal --in other words, the root of the subtree to traverse over. throws: TransformerException - |
traverse | public void traverse(int pos, int top) throws org.xml.sax.SAXException(Code) | | Perform a non-recursive pre-order/post-order traversal,
operating as a Visitor. startNode (preorder) and endNode
(postorder) are invoked for each node as we traverse over them,
with the result that the node is written out to m_contentHandler.
Parameters: pos - Node in the tree where to start traversal Parameters: top - Node in the tree where to end traversal.If top==DTM.NULL, run through end of document. throws: TransformerException - |
|
|