public class DTMTreeWalker extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DTM |
m_dtm
DomHelper for this TreeWalker
|
| Constructor and Description |
|---|
DTMTreeWalker()
Constructor.
|
DTMTreeWalker(ContentHandler contentHandler,
DTM dtm)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
endNode(int node)
End processing of given node
|
ContentHandler |
getcontentHandler()
Get the ContentHandler used for the tree walk.
|
void |
setcontentHandler(ContentHandler ch)
Set the ContentHandler used for the tree walk.
|
void |
setDTM(DTM dtm)
Set the DTM to be traversed.
|
protected void |
startNode(int node)
Start processing given node
|
void |
traverse(int pos)
Perform a non-recursive pre-order/post-order traversal,
operating as a Visitor.
|
void |
traverse(int pos,
int top)
Perform a non-recursive pre-order/post-order traversal,
operating as a Visitor.
|
protected DTM m_dtm
public DTMTreeWalker()
public DTMTreeWalker(ContentHandler contentHandler, DTM dtm)
contentHandler - The implemention of the
contentHandler operation (toXMLString, digest, ...)public void setDTM(DTM dtm)
dtm - The Document Table Model to be used.public ContentHandler getcontentHandler()
public void setcontentHandler(ContentHandler ch)
ch - the ContentHandler to be the result of the tree walk.public void traverse(int pos)
throws SAXException
pos - Node in the tree at which to start (and end) traversal --
in other words, the root of the subtree to traverse over.TransformerExceptionSAXExceptionpublic void traverse(int pos,
int top)
throws SAXException
pos - Node in the tree where to start traversaltop - Node in the tree where to end traversal.
If top==DTM.NULL, run through end of document.TransformerExceptionSAXExceptionprotected void startNode(int node)
throws SAXException
node - Node to processSAXExceptionprotected void endNode(int node)
throws SAXException
node - Node we just finished processingSAXExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.