|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfor.jfor.tools.ElementVisitor
org.jfor.jfor.tools.DomToSaxAdapter
public class DomToSaxAdapter
Walks a DOM document and fires (some) SAX events to simulate parsing
of the original document.
Written to use jfor with Cocoon 1.8.
Only SAX events that are used by the jfor Converter class are implemented.
Namespace URIs and local names are not implemented.
Constructor Summary | |
---|---|
DomToSaxAdapter(org.w3c.dom.Document doc)
create an adapter for the given DOM Document |
Method Summary | |
---|---|
protected void |
endElement(org.w3c.dom.Element e)
called at the end of the visit of an Element |
void |
simulateParsing(org.xml.sax.ContentHandler ch)
walk the document and send SAX events to the given ContentHandler |
protected void |
startElement(org.w3c.dom.Element e)
called at the start of the visit of an Element |
protected void |
visitCDATA(org.w3c.dom.CDATASection cds)
called to visit a CDATASection node |
protected void |
visitComment(org.w3c.dom.Comment c)
called to visit a Comment node |
protected void |
visitNode(org.w3c.dom.Node n)
called to visit a Node that is not of the other types |
protected void |
visitText(org.w3c.dom.Text t)
called to visit a Text node |
Methods inherited from class org.jfor.jfor.tools.ElementVisitor |
---|
visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomToSaxAdapter(org.w3c.dom.Document doc)
Method Detail |
---|
public void simulateParsing(org.xml.sax.ContentHandler ch) throws java.io.IOException, org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
protected void startElement(org.w3c.dom.Element e) throws java.io.IOException, org.xml.sax.SAXException
startElement
in class ElementVisitor
java.io.IOException
org.xml.sax.SAXException
protected void endElement(org.w3c.dom.Element e) throws java.io.IOException, org.xml.sax.SAXException
endElement
in class ElementVisitor
java.io.IOException
org.xml.sax.SAXException
protected void visitText(org.w3c.dom.Text t) throws java.io.IOException, org.xml.sax.SAXException
visitText
in class ElementVisitor
java.io.IOException
org.xml.sax.SAXException
protected void visitCDATA(org.w3c.dom.CDATASection cds) throws java.io.IOException
visitCDATA
in class ElementVisitor
java.io.IOException
protected void visitComment(org.w3c.dom.Comment c) throws java.io.IOException
visitComment
in class ElementVisitor
java.io.IOException
protected void visitNode(org.w3c.dom.Node n) throws java.io.IOException
visitNode
in class ElementVisitor
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |