public interface XMLWriter
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Close this writer and free any resources associated with the
writer.
|
void |
flush() |
flush any cached data to the underlying output mechanism.
|
java.util.Map |
getNamespaceMap() |
returns the set of declared prefix -> namespace mappings.
|
void |
setDefaultNamespace(java.lang.String namespaceURI) |
Defines the default namespace.
|
void |
setDefaultPrefixes(java.util.Map prefixMap) |
|
void |
setNamespaceMap(java.util.Map namespaces) |
Defines the set of predeclared prefix -> namespace mappings
|
void |
setPrefix(java.lang.String prefix,
java.lang.String namespaceURI) |
Defines the prefix to be used for elements in the identified namespace.
|
void |
writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value) |
writes an attribute to the preceeding start tag, binding the namespaces if necessary.
|
void |
writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
javax.xml.namespace.QName value) |
writes an attribute that has a QName value to the preceeding start tag, binding the namespaces if necessary.
|
void |
writeCharacters(java.lang.String value) |
writes a CharacterData node to the document.
|
void |
writeCharacters(javax.xml.namespace.QName value) |
writes the QName as CharacterData node to the document.
|
void |
writeEndElement() |
Writes the end tag for the current Element.
|
void |
writeStartElement(java.lang.String namespaceURI,
java.lang.String localName) |
writes a Start tag for an element with the provided QName, binding the namespaces if necessary.
|
void writeStartElement(java.lang.String namespaceURI,
java.lang.String localName)
throws XMLWriterRuntimeException
namespaceURI - localName - XMLWriterRuntimeExceptionvoid writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
throws XMLWriterRuntimeException,
java.lang.IllegalStateException
namespaceURI - localName - value - XMLWriterRuntimeExceptionjava.lang.IllegalStateExceptionvoid writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
javax.xml.namespace.QName value)
throws XMLWriterRuntimeException,
java.lang.IllegalStateException
namespaceURI - localName - value - XMLWriterRuntimeExceptionjava.lang.IllegalStateExceptionvoid writeCharacters(java.lang.String value)
throws XMLWriterRuntimeException
value - XMLWriterRuntimeExceptionvoid writeCharacters(javax.xml.namespace.QName value)
throws XMLWriterRuntimeException,
java.lang.IllegalStateException
value - XMLWriterRuntimeExceptionjava.lang.IllegalStateException - if the namespace has not been bound.void writeEndElement()
throws XMLWriterRuntimeException
XMLWriterRuntimeExceptionvoid setPrefix(java.lang.String prefix,
java.lang.String namespaceURI)
throws XMLWriterRuntimeException
namespaceURI - prefix - XMLWriterRuntimeExceptionvoid setDefaultNamespace(java.lang.String namespaceURI)
throws XMLWriterRuntimeException
namespaceURI - XMLWriterRuntimeExceptionvoid setDefaultPrefixes(java.util.Map prefixMap)
java.util.Map getNamespaceMap()
void setNamespaceMap(java.util.Map namespaces)
namespaces - void flush()
throws XMLWriterRuntimeException
XMLWriterRuntimeExceptionvoid close()
throws XMLWriterRuntimeException
XMLWriterRuntimeException