public final class XmlPullBasedXmlLowLevelSerializer extends Object implements XmlLowLevelSerializer
XmlLowLevelSerializer. Suitable for the Android platform.| Constructor and Description |
|---|
XmlPullBasedXmlLowLevelSerializer(XmlLowLevelConfiguration config)
Constructs a new
StaxBasedXmlLowLevelSerializer. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public XmlPullBasedXmlLowLevelSerializer(XmlLowLevelConfiguration config)
StaxBasedXmlLowLevelSerializer.config - the configuration objectpublic void open(Writer writer)
open in interface LowLevelSerializerwriter - the writer to base the stream onpublic void writeXmlDeclaration(String version, String encoding)
writeXmlDeclaration in interface XmlLowLevelSerializerversion - version of the xml documentencoding - encoding of the xml declarationpublic void writeDocTypeDeclaration(QName rootElementName, String publicId, String systemId)
writeDocTypeDeclaration in interface XmlLowLevelSerializerrootElementName - the name of the root element.publicId - the public id - may be nullsystemId - the system idpublic void writeStartElement(QName name)
writeStartElement in interface XmlLowLevelSerializername - the name of the elementpublic void writeStartElement(QName name, QName dataTypeName)
writeStartElement in interface XmlLowLevelSerializername - the name of the elementdataTypeName - the name of its data typepublic void writeAttribute(QName name, String value)
writeAttribute in interface XmlLowLevelSerializername - the attribute namevalue - the attribute valuepublic void writeText(String text, TextMode textMode)
writeText in interface XmlLowLevelSerializertext - the text.textMode - the text mode (IMPLICIT/CDATA).public void writeEndElement()
writeEndElement in interface XmlLowLevelSerializerpublic void flush()
flush in interface LowLevelSerializerpublic void close(boolean closeWriter)
closeWriter is
true, too.close in interface LowLevelSerializercloseWriter - if true, the underlying writer will be closed, too.Copyright © 2014. All rights reserved.