public interface XMLWriter
Modifier and Type | Method and Description |
---|---|
void |
attribute(java.lang.String qName,
java.lang.String value)
Add an un-qualified attribute to an element.
|
void |
attribute(java.lang.String nsURI,
java.lang.String localName,
java.lang.String value)
Add an attribute to an element.
|
void |
close()
Close this XMLWriter, and it's underlying stream.
|
void |
closeTag(java.lang.String name)
Closes an un-qualified element.
|
void |
closeTag(java.lang.String nsURI,
java.lang.String qName)
Closes an element
|
void |
declareNamespace(java.lang.String nsURI,
java.lang.String prefixHint)
Hints that a namespace is going to be used in a sub-tree.
|
void |
openTag(java.lang.String name)
Open a new unqualified XML tag.
|
void |
openTag(java.lang.String nsURI,
java.lang.String localName)
Open a new namespace-qualified XML tag.
|
void |
print(java.lang.String data)
Prints some textual content in an element.
|
void |
println(java.lang.String data)
Prints some textual content, terminated with a newline character.
|
void |
printRaw(java.lang.String s)
Send raw data to the stream.
|
void printRaw(java.lang.String s) throws java.io.IOException
s
- a string of data to include verbatim in the XML streamjava.io.IOException
void openTag(java.lang.String nsURI, java.lang.String localName) throws java.io.IOException
nsURI
- A URI for the namespace to uselocalName
- The name of the tagjava.io.IOException
void openTag(java.lang.String name) throws java.io.IOException
name
- The name of the tag.java.io.IOException
void attribute(java.lang.String nsURI, java.lang.String localName, java.lang.String value) throws java.io.IOException
openTag
command.nsURI
- A URI for the namespace to uselocalName
- The name of the attributevalue
- The textual value of the attributejava.io.IOException
void attribute(java.lang.String qName, java.lang.String value) throws java.io.IOException
openTag
command.qName
- The name of the attribute to setvalue
- The textual value of the attributejava.io.IOException
void print(java.lang.String data) throws java.io.IOException
java.io.IOException
void println(java.lang.String data) throws java.io.IOException
java.io.IOException
void closeTag(java.lang.String nsURI, java.lang.String qName) throws java.io.IOException
nsURI
- A URI for the namespace to useqName
- The name of the tagjava.io.IOException
void closeTag(java.lang.String name) throws java.io.IOException
name
- The tag namejava.io.IOException
void declareNamespace(java.lang.String nsURI, java.lang.String prefixHint) throws java.io.IOException
nsURI
- The namespace to declareprefixHint
- A suggested prefix-string for this namespace.java.io.IOException
void close() throws java.io.IOException
java.io.IOException