public class SAXBeanWriter extends AbstractBeanWriter
Constructor and Description |
---|
SAXBeanWriter(org.xml.sax.ContentHandler contentHandler)
Constructor sets writer used for output.
|
Modifier and Type | Method and Description |
---|---|
protected void |
bodyText(WriteContext context,
String text)
Express body text
|
void |
end()
This method will announce the end of the document to
the contenthandler.
|
protected void |
endElement(WriteContext context,
String uri,
String localName,
String qName)
Writes the end tag for an element
|
boolean |
getCallDocumentEvents()
Should document events (ie start and end) be called?
|
org.apache.commons.logging.Log |
getLog()
Set the log implementation used.
|
void |
setCallDocumentEvents(boolean callDocumentEvents)
Sets whether the document events (ie start and end) should be called.
|
void |
setLog(org.apache.commons.logging.Log log)
Set the log implementation used.
|
void |
start()
This will announce the start of the document
to the contenthandler.
|
protected void |
startElement(WriteContext context,
String uri,
String localName,
String qName,
org.xml.sax.Attributes attributes)
Writes the start tag for an element.
|
bodyText, endElement, expressAttribute, expressAttribute, expressBodyText, expressElementEnd, expressElementEnd, expressElementEnd, expressElementStart, expressElementStart, expressTagClose, getAbstractBeanWriterLog, getBindingConfiguration, getIdGenerator, getIndentLevel, getWriteEmptyElements, getWriteIDs, getXMLIntrospector, popBean, pushBean, setAbstractBeanWriterLog, setBindingConfiguration, setIdGenerator, setWriteEmptyElements, setWriteIDs, setXMLIntrospector, startElement, write, write, write, write, write, writeAttribute, writeAttributes, writeContent, writeIDREFElement, writeIndent, writePrintln, writeRestOfElement
public SAXBeanWriter(org.xml.sax.ContentHandler contentHandler)
Constructor sets writer used for output.
contentHandler
- feed events to this content handlerpublic boolean getCallDocumentEvents()
public void setCallDocumentEvents(boolean callDocumentEvents)
callDocumentEvents
- should document events be calledpublic org.apache.commons.logging.Log getLog()
Set the log implementation used.
Log
implementation that this class logs topublic void setLog(org.apache.commons.logging.Log log)
Set the log implementation used.
log
- Log
implementation to useprotected void startElement(WriteContext context, String uri, String localName, String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in class AbstractBeanWriter
uri
- the element's namespace urilocalName
- the element's local nameqName
- the element's qualified nameattributes
- the element's attributesorg.xml.sax.SAXException
- if an SAX problem occurs during writingprotected void endElement(WriteContext context, String uri, String localName, String qName) throws org.xml.sax.SAXException
endElement
in class AbstractBeanWriter
uri
- the element's namespace urilocalName
- the element's local nameqName
- the element's qualified nameorg.xml.sax.SAXException
- if an SAX problem occurs during writingprotected void bodyText(WriteContext context, String text) throws org.xml.sax.SAXException
bodyText
in class AbstractBeanWriter
text
- the element body textorg.xml.sax.SAXException
- if the ContentHandler
has a problempublic void start() throws org.xml.sax.SAXException
start
in class AbstractBeanWriter
org.xml.sax.SAXException
- if an SAX problem occurs during writingAbstractBeanWriter.end()
public void end() throws org.xml.sax.SAXException
end
in class AbstractBeanWriter
org.xml.sax.SAXException
- if an SAX problem occurs during writingAbstractBeanWriter.start()
Copyright © 2002-2013 Apache Software Foundation. All Rights Reserved.