public class DomToSaxAdapter extends ElementVisitor
| Constructor and Description |
|---|
DomToSaxAdapter(org.w3c.dom.Document doc)
create an adapter for the given DOM Document
|
| Modifier and Type | Method and Description |
|---|---|
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
|
visitpublic DomToSaxAdapter(org.w3c.dom.Document doc)
public void simulateParsing(org.xml.sax.ContentHandler ch)
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOExceptionorg.xml.sax.SAXExceptionprotected void startElement(org.w3c.dom.Element e)
throws java.io.IOException,
org.xml.sax.SAXException
startElement in class ElementVisitorjava.io.IOExceptionorg.xml.sax.SAXExceptionprotected void endElement(org.w3c.dom.Element e)
throws java.io.IOException,
org.xml.sax.SAXException
endElement in class ElementVisitorjava.io.IOExceptionorg.xml.sax.SAXExceptionprotected void visitText(org.w3c.dom.Text t)
throws java.io.IOException,
org.xml.sax.SAXException
visitText in class ElementVisitorjava.io.IOExceptionorg.xml.sax.SAXExceptionprotected void visitCDATA(org.w3c.dom.CDATASection cds)
throws java.io.IOException
visitCDATA in class ElementVisitorjava.io.IOExceptionprotected void visitComment(org.w3c.dom.Comment c)
throws java.io.IOException
visitComment in class ElementVisitorjava.io.IOExceptionprotected void visitNode(org.w3c.dom.Node n)
throws java.io.IOException
visitNode in class ElementVisitorjava.io.IOException