|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jsefa.xml.lowlevel.XmlPullBasedXmlLowLevelSerializer
public final class XmlPullBasedXmlLowLevelSerializer
XmlPull V1 based implementation of XmlLowLevelSerializer
. Suitable for the Android platform.
Constructor Summary | |
---|---|
XmlPullBasedXmlLowLevelSerializer(XmlLowLevelConfiguration config)
Constructs a new StaxBasedXmlLowLevelSerializer . |
Method Summary | |
---|---|
void |
close(boolean closeWriter)
Closes the serialization stream. |
void |
flush()
Flushes the stream. |
void |
open(Writer writer)
Opens a new serialization stream based on the given writer. |
void |
writeAttribute(QName name,
String value)
Writes an attribute with the given name and value. |
void |
writeDocTypeDeclaration(QName rootElementName,
String publicId,
String systemId)
Writes the DOCTYPE declaration. |
void |
writeEndElement()
Writes the end tag of the current element. |
void |
writeStartElement(QName name)
Writes the start tag of an element. |
void |
writeStartElement(QName name,
QName dataTypeName)
Writes the start tag of an element. |
void |
writeText(String text,
TextMode textMode)
Writes the given text as the content of the current element if the text is not empty. |
void |
writeXmlDeclaration(String version,
String encoding)
Writes the XML Declaration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlPullBasedXmlLowLevelSerializer(XmlLowLevelConfiguration config)
StaxBasedXmlLowLevelSerializer
.
config
- the configuration objectMethod Detail |
---|
public void open(Writer writer)
open
in interface LowLevelSerializer
writer
- the writer to base the stream onpublic void writeXmlDeclaration(String version, String encoding)
writeXmlDeclaration
in interface XmlLowLevelSerializer
version
- version of the xml documentencoding
- encoding of the xml declarationpublic void writeDocTypeDeclaration(QName rootElementName, String publicId, String systemId)
writeDocTypeDeclaration
in interface XmlLowLevelSerializer
rootElementName
- the name of the root element.publicId
- the public id - may be nullsystemId
- the system idpublic void writeStartElement(QName name)
writeStartElement
in interface XmlLowLevelSerializer
name
- the name of the elementpublic void writeStartElement(QName name, QName dataTypeName)
writeStartElement
in interface XmlLowLevelSerializer
name
- the name of the elementdataTypeName
- the name of its data typepublic void writeAttribute(QName name, String value)
writeAttribute
in interface XmlLowLevelSerializer
name
- the attribute namevalue
- the attribute valuepublic void writeText(String text, TextMode textMode)
writeText
in interface XmlLowLevelSerializer
text
- the text.textMode
- the text mode (IMPLICIT/CDATA).public void writeEndElement()
writeEndElement
in interface XmlLowLevelSerializer
public void flush()
flush
in interface LowLevelSerializer
public void close(boolean closeWriter)
closeWriter
is
true, too.
close
in interface LowLevelSerializer
closeWriter
- if true, the underlying writer will be closed, too.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |