public final class SAXSerializer extends Serializer implements org.xml.sax.XMLReader
| Constructor and Description |
|---|
SAXSerializer(Result res)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(byte[] n,
byte[] v)
Serializes an attribute.
|
void |
closeResult()
Closes a result.
|
void |
finishAtomic(Item b)
Serializes an item.
|
protected void |
finishClose()
Closes an element.
|
void |
finishComment(byte[] t)
Serializes a comment.
|
protected void |
finishEmpty()
Closes an empty element.
|
protected void |
finishOpen()
Finishes an opening element node.
|
void |
finishPi(byte[] n,
byte[] v)
Serializes a processing instruction.
|
void |
finishText(byte[] b)
Serializes a text.
|
org.xml.sax.ContentHandler |
getContentHandler() |
org.xml.sax.DTDHandler |
getDTDHandler() |
org.xml.sax.EntityResolver |
getEntityResolver() |
org.xml.sax.ErrorHandler |
getErrorHandler() |
boolean |
getFeature(java.lang.String name) |
java.lang.Object |
getProperty(java.lang.String name) |
void |
openResult()
Starts a result.
|
void |
parse(org.xml.sax.InputSource input) |
void |
parse(java.lang.String id) |
void |
setContentHandler(org.xml.sax.ContentHandler c) |
void |
setDTDHandler(org.xml.sax.DTDHandler h) |
void |
setEntityResolver(org.xml.sax.EntityResolver resolver) |
void |
setErrorHandler(org.xml.sax.ErrorHandler h) |
void |
setFeature(java.lang.String name,
boolean value) |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler l)
Sets the lexical handler for reacting on comments.
|
void |
setProperty(java.lang.String name,
java.lang.Object value) |
protected void |
startOpen(byte[] t)
Starts an element.
|
atomic, close, closeElement, comment, emptyElement, emptyElement, finished, get, get, namespace, node, node, openElement, openElement, pi, reset, textpublic SAXSerializer(Result res)
res - resultpublic org.xml.sax.ContentHandler getContentHandler()
getContentHandler in interface org.xml.sax.XMLReaderpublic org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler in interface org.xml.sax.XMLReaderpublic org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver in interface org.xml.sax.XMLReaderpublic org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler in interface org.xml.sax.XMLReaderpublic boolean getFeature(java.lang.String name)
getFeature in interface org.xml.sax.XMLReaderpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface org.xml.sax.XMLReaderpublic void parse(org.xml.sax.InputSource input)
throws org.xml.sax.SAXException
parse in interface org.xml.sax.XMLReaderorg.xml.sax.SAXExceptionpublic void parse(java.lang.String id)
throws org.xml.sax.SAXException
parse in interface org.xml.sax.XMLReaderorg.xml.sax.SAXExceptionpublic void setContentHandler(org.xml.sax.ContentHandler c)
setContentHandler in interface org.xml.sax.XMLReaderpublic void setLexicalHandler(org.xml.sax.ext.LexicalHandler l)
l - handlerpublic void setDTDHandler(org.xml.sax.DTDHandler h)
setDTDHandler in interface org.xml.sax.XMLReaderpublic void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver in interface org.xml.sax.XMLReaderpublic void setErrorHandler(org.xml.sax.ErrorHandler h)
setErrorHandler in interface org.xml.sax.XMLReaderpublic void setFeature(java.lang.String name,
boolean value)
setFeature in interface org.xml.sax.XMLReaderpublic void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface org.xml.sax.XMLReaderpublic void openResult()
throws java.io.IOException
SerializeropenResult in class Serializerjava.io.IOException - I/O exceptionpublic void closeResult()
throws java.io.IOException
SerializercloseResult in class Serializerjava.io.IOException - I/O exceptionpublic void attribute(byte[] n,
byte[] v)
Serializerattribute in class Serializern - namev - valueprotected void startOpen(byte[] t)
SerializerstartOpen in class Serializert - tag nameprotected void finishOpen()
throws java.io.IOException
SerializerfinishOpen in class Serializerjava.io.IOException - I/O exceptionprotected void finishEmpty()
throws java.io.IOException
SerializerfinishEmpty in class Serializerjava.io.IOException - I/O exceptionprotected void finishClose()
throws java.io.IOException
SerializerfinishClose in class Serializerjava.io.IOException - I/O exceptionpublic void finishText(byte[] b)
throws java.io.IOException
SerializerfinishText in class Serializerb - valuejava.io.IOException - I/O exceptionpublic void finishComment(byte[] t)
throws java.io.IOException
SerializerfinishComment in class Serializert - valuejava.io.IOException - I/O exceptionpublic void finishPi(byte[] n,
byte[] v)
throws java.io.IOException
SerializerfinishPi in class Serializern - namev - valuejava.io.IOException - I/O exceptionpublic void finishAtomic(Item b) throws java.io.IOException
SerializerfinishAtomic in class Serializerb - itemjava.io.IOException - I/O exception