|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnu.xom.converters.SAXConverter
This class walks a XOM tree, while firing events into a
SAX2 ContentHandler
.
Constructor Summary | |
SAXConverter(org.xml.sax.ContentHandler handler)
Creates a new SAXConverter . |
Method Summary | |
void |
convert(Document doc)
Feed a document through this converter. |
org.xml.sax.ContentHandler |
getContentHandler()
Returns the ContentHandler . |
org.xml.sax.ext.LexicalHandler |
getLexicalHandler()
Returns the LexicalHandler for this
converter. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the ContentHandler for this converter. |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Sets the optional LexicalHandler for this
converter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SAXConverter(org.xml.sax.ContentHandler handler)
Creates a new SAXConverter
.
handler
- SAX2 ContentHandler
that receives the data
java.lang.NullPointerException
- if handler is nullMethod Detail |
public void setContentHandler(org.xml.sax.ContentHandler handler)
Set the ContentHandler
for this converter.
handler
- SAX2 ContentHandler
that
receives the data
java.lang.NullPointerException
- if handler is nullpublic org.xml.sax.ContentHandler getContentHandler()
Returns the ContentHandler
.
ContentHandler
that receives the datapublic void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Sets the optional LexicalHandler
for this
converter. The only lexical events the converter supplies
are comments.
handler
- the LexicalHandler
;
may be null to turn off lexical eventspublic org.xml.sax.ext.LexicalHandler getLexicalHandler()
Returns the LexicalHandler
for this
converter. This is only used for comments.
LexicalHandler
that receives
lexical eventspublic void convert(Document doc) throws org.xml.sax.SAXException
Feed a document through this converter.
doc
- the document to pass to SAX
org.xml.sax.SAXException
- if the ContentHandler
or LexicalHandler
throws an exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |