net.sf.jsefa.xml.lowlevel
Interface XmlLowLevelSerializer

All Superinterfaces:
LowLevelSerializer
All Known Implementing Classes:
StaxBasedXmlLowLevelSerializer, XmlPullBasedXmlLowLevelSerializer

public interface XmlLowLevelSerializer
extends LowLevelSerializer

Low level XML Serializer.

Author:
Norman Lahme-Huetig, Matthias Derer

Method Summary
 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 interface net.sf.jsefa.common.lowlevel.LowLevelSerializer
close, flush, open
 

Method Detail

writeXmlDeclaration

void writeXmlDeclaration(String version,
                         String encoding)
Writes the XML Declaration. Note that the encoding parameter does not set the actual encoding of the underlying writer.

Parameters:
version - version of the xml document
encoding - encoding of the xml declaration
Throws:
LowLevelSerializationException

writeDocTypeDeclaration

void writeDocTypeDeclaration(QName rootElementName,
                             String publicId,
                             String systemId)
Writes the DOCTYPE declaration.

Parameters:
rootElementName - the name of the root element.
publicId - the public id - may be null
systemId - the system id

writeStartElement

void writeStartElement(QName name)
Writes the start tag of an element.

Parameters:
name - the name of the element
Throws:
LowLevelSerializationException

writeStartElement

void writeStartElement(QName name,
                       QName dataTypeName)
Writes the start tag of an element.

Parameters:
name - the name of the element
dataTypeName - the name of its data type
Throws:
LowLevelSerializationException

writeAttribute

void writeAttribute(QName name,
                    String value)
Writes an attribute with the given name and value.

Parameters:
name - the attribute name
value - the attribute value
Throws:
LowLevelSerializationException

writeText

void writeText(String text,
               TextMode textMode)
Writes the given text as the content of the current element if the text is not empty. Otherwise nothing happens.

Parameters:
text - the text.
textMode - the text mode (IMPLICIT/CDATA).
Throws:
LowLevelSerializationException

writeEndElement

void writeEndElement()
Writes the end tag of the current element.

Throws:
LowLevelSerializationException


Copyright © 2014. All rights reserved.