public final class TXWSerializer extends Object implements XmlSerializer
TypedXmlWriter
to TXW| Modifier and Type | Field and Description |
|---|---|
TypedXmlWriter |
txw |
| Constructor and Description |
|---|
TXWSerializer(TypedXmlWriter txw) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginStartTag(String uri,
String localName,
String prefix)
Begins writing a start tag.
|
void |
cdata(StringBuilder text)
Writes CDATA.
|
void |
comment(StringBuilder comment)
Writes a comment.
|
void |
endDocument()
The last method to be called.
|
void |
endStartTag(String uri,
String localName,
String prefix)
Completes the start tag.
|
void |
endTag()
Writes an end tag.
|
void |
flush()
Flush the buffer.
|
void |
startDocument()
The first method to be called.
|
void |
text(StringBuilder text)
Writes PCDATA.
|
void |
writeAttribute(String uri,
String localName,
String prefix,
StringBuilder value)
Writes an attribute.
|
void |
writeXmlns(String prefix,
String uri)
Writes a namespace declaration.
|
public final TypedXmlWriter txw
public TXWSerializer(TypedXmlWriter txw)
public void startDocument()
XmlSerializerstartDocument in interface XmlSerializerpublic void endDocument()
XmlSerializerendDocument in interface XmlSerializerpublic void beginStartTag(String uri, String localName, String prefix)
XmlSerializerbeginStartTag in interface XmlSerializeruri - the namespace URI of the element. Can be empty but never be null.prefix - the prefix that should be used for this element. Can be empty,
but never null.public void writeAttribute(String uri, String localName, String prefix, StringBuilder value)
XmlSerializerwriteAttribute in interface XmlSerializeruri - the namespace URI of the attribute. Can be empty but never be null.prefix - the prefix that should be used for this attribute. Can be empty,
but never null.value - The value of the attribute. It's the callee's responsibility to
escape special characters (such as <, >, and &) in this buffer.public void writeXmlns(String prefix, String uri)
XmlSerializerwriteXmlns in interface XmlSerializerprefix - the prefix that is allocated. Can be empty but never be null.uri - the namespace URI to be declared. Can be empty but never be null.public void endStartTag(String uri, String localName, String prefix)
XmlSerializerendStartTag in interface XmlSerializeruri - the namespace URI of the element. Can be empty but never be null.prefix - the prefix that should be used for this element. Can be empty,
but never null.public void endTag()
XmlSerializerendTag in interface XmlSerializerpublic void text(StringBuilder text)
XmlSerializertext in interface XmlSerializertext - The character data to be written. It's the callee's responsibility to
escape special characters (such as <, >, and &) in this buffer.public void cdata(StringBuilder text)
XmlSerializercdata in interface XmlSerializerpublic void comment(StringBuilder comment)
XmlSerializercomment in interface XmlSerializerpublic void flush()
XmlSerializerTypedXmlWriter.commit(boolean)
method. If the implementation performs any buffering, it should flush the buffer.flush in interface XmlSerializerCopyright © 2005–2017 Oracle Corporation. All rights reserved.