|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XmlWriter
Interface describing common options for classes that serialize XML
Method Summary | |
---|---|
Collection |
getCdataSectionElements()
Get the list of element tag names whose text content should be output as CDATA sections. |
boolean |
getDisableTextEscaping()
Return non-zero if XML text escaping is disabled for this XmlWriter. |
String |
getDoctypePublic()
Return the DOCTYPE PUBLIC id to use for the DTD declaration |
String |
getDoctypeSystem()
Return the DOCTYPE SYSTEM id to use for the XML-declaration |
String |
getEncoding()
Get the encoding string that will be specified in the XML declaration, if a declaration is output |
boolean |
getIndent()
Return if this object will inject whitespace to "pretty print" the serialization of a DOM tree |
boolean |
getStandalone()
Return if this object will write a "standalone=yes" declaration in the XML-declaration. |
boolean |
getWriteDeclaration()
Return if this object will write an XML-declaration when it serializes a DOM tree |
void |
setCdataSectionElements(Collection cdataSectionElements)
Set the list of element tag names whose text content should be output as CDATA sections. |
void |
setDisableTextEscaping(boolean disableTextEscaping)
Set if XML text escaping is to be disabled for this XmlWriter. |
void |
setDoctypePublic(String doctypePublic)
Set the DOCTYPE PUBLIC id to use in the DTD declaration Note that this will only be used if the DOCTYPE SYSTEM id is not null and non-empty (see setDoctypeSystem()), and that the public id overrides the system id. |
void |
setDoctypeSystem(String doctypeSystem)
Set the DOCTYPE SYSTEM id to use in the DTD declaration Note that this will be overridden by the DOCTYPE PUBLIC id (see setDoctypePublic()), but must be set to use the public id. |
void |
setEncoding(String encoding)
Set the encoding string that will be specified in the XML declaration, if a declaration is output. |
void |
setIndent(boolean indent)
Set whether this object should inject whitespace to "pretty print" the serialization of a DOM tree. |
void |
setStandalone(boolean standalone)
Set whether this object should write a "standalone=yes" declaration in the XML-declaration |
void |
setWriteDeclaration(boolean writeDeclaration)
Set whether this object should output an XML-declaration when it serializes a DOM tree |
void |
write()
Cause the XmlWriter to serialize its document to its byte sink |
Method Detail |
---|
void write() throws IOException
IOException
boolean getWriteDeclaration()
void setWriteDeclaration(boolean writeDeclaration)
writeDeclaration
- True if an XML-declaration should be writtenString getEncoding()
void setEncoding(String encoding)
encoding
- The encoding string to place in the xml
declarationboolean getIndent()
void setIndent(boolean indent)
indent
- True if whitespace should be injected to "pretty print"
the XML serialization of a DOM tree.boolean getStandalone()
void setStandalone(boolean standalone)
standalone
- True if a standalone="yes" declaration should be
written in the XML-declarationString getDoctypePublic()
void setDoctypePublic(String doctypePublic)
doctypePublic
- The DOCTYPE PUBLIC id to use in the DTD declaration
or null if none should be used.String getDoctypeSystem()
void setDoctypeSystem(String doctypeSystem)
doctypeSystem
- The DOCTYPE SYSTEM id to use in the DTD declaration
or null if none should be used.boolean getDisableTextEscaping()
void setDisableTextEscaping(boolean disableTextEscaping)
disableTextEscaping
- True if text escaping is disabledCollection getCdataSectionElements()
void setCdataSectionElements(Collection cdataSectionElements)
cdataSectionElements
- A Collection of ExpandedQName objects, each
of which represents an element tag name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |