|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.serializer.TreeWalker
public final class TreeWalker
This class does a pre-order walk of the DOM tree, calling a ContentHandler interface as it goes. This class is a copy of the one in org.apache.xml.utils. It exists to cut the serializers dependancy on that package.
Field Summary | |
---|---|
private org.xml.sax.ContentHandler |
m_contentHandler
Local reference to a ContentHandler |
protected DOM2Helper |
m_dh
DomHelper for this TreeWalker |
private org.xml.sax.helpers.LocatorImpl |
m_locator
Locator object for this TreeWalker |
private SerializationHandler |
m_Serializer
If m_contentHandler is a SerializationHandler, then this is a reference to the same object. |
(package private) boolean |
nextIsRaw
Flag indicating whether following text to be processed is raw text |
Constructor Summary | |
---|---|
TreeWalker(org.xml.sax.ContentHandler ch)
|
|
TreeWalker(org.xml.sax.ContentHandler contentHandler,
java.lang.String systemId)
Constructor. |
Method Summary | |
---|---|
private void |
dispatachChars(org.w3c.dom.Node node)
Optimized dispatch of characters. |
protected void |
endNode(org.w3c.dom.Node node)
End processing of given node |
org.xml.sax.ContentHandler |
getContentHandler()
Get the ContentHandler used for the tree walk. |
protected void |
startNode(org.w3c.dom.Node node)
Start processing given node |
void |
traverse(org.w3c.dom.Node pos)
Perform a pre-order traversal non-recursive style. |
void |
traverse(org.w3c.dom.Node pos,
org.w3c.dom.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 |
Field Detail |
---|
private final org.xml.sax.ContentHandler m_contentHandler
private final SerializationHandler m_Serializer
protected final DOM2Helper m_dh
private final org.xml.sax.helpers.LocatorImpl m_locator
boolean nextIsRaw
Constructor Detail |
---|
public TreeWalker(org.xml.sax.ContentHandler ch)
public TreeWalker(org.xml.sax.ContentHandler contentHandler, java.lang.String systemId)
contentHandler
- The implemention of the
contentHandler operation (toXMLString, digest, ...)Method Detail |
---|
public org.xml.sax.ContentHandler getContentHandler()
public void traverse(org.w3c.dom.Node pos) throws org.xml.sax.SAXException
pos
- Node in the tree where to start traversal
TransformerException
org.xml.sax.SAXException
public void traverse(org.w3c.dom.Node pos, org.w3c.dom.Node top) throws org.xml.sax.SAXException
pos
- Node in the tree where to start traversaltop
- Node in the tree where to end traversal
TransformerException
org.xml.sax.SAXException
private final void dispatachChars(org.w3c.dom.Node node) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void startNode(org.w3c.dom.Node node) throws org.xml.sax.SAXException
node
- Node to process
org.xml.sax.SAXException
protected void endNode(org.w3c.dom.Node node) throws org.xml.sax.SAXException
node
- Node we just finished processing
org.xml.sax.SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |