public interface XMLWriter
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String key,
java.lang.String value)
Add a XML attribute to the current XML Element.
|
void |
endElement()
End the previously opened element.
|
void |
setDocType(java.lang.String docType)
Sets the docType of the document.
|
void |
setEncoding(java.lang.String encoding)
Sets the encoding of the document.
|
void |
startElement(java.lang.String name)
Start an XML Element tag.
|
void |
writeMarkup(java.lang.String text)
Add a preformatted markup to the current element tag
|
void |
writeText(java.lang.String text)
Add a value text to the current element tag
This will perform XML escaping to guarantee valid content
|
void setEncoding(java.lang.String encoding)
encoding - the encodingjava.lang.IllegalStateException - if the generation of the document has already startedvoid setDocType(java.lang.String docType)
docType - the docTypejava.lang.IllegalStateException - if the generation of the document has already startedvoid startElement(java.lang.String name)
throws java.io.IOException
name - The name of the tag.java.io.IOException - if starting the element fails.void addAttribute(java.lang.String key,
java.lang.String value)
throws java.io.IOException
startElement(String)key - The key of the attribute.value - The value of the attribute.java.lang.IllegalStateException - if no element tag is currently in processjava.io.IOException - if adding the attribute fails.void writeText(java.lang.String text)
throws java.io.IOException
text - The text which should be written.java.lang.IllegalStateException - if no element tag got started yetjava.io.IOException - if writing the text fails.void writeMarkup(java.lang.String text)
throws java.io.IOException
text - The text which should be written.java.lang.IllegalStateException - if no element tag got started yetjava.io.IOException - if writing the markup fails.void endElement()
throws java.io.IOException
java.io.IOException - if ending the element fails.startElement(String)