public interface XMLWriter
| Modifier and Type | Method and 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.
|
Map |
getNamespaceMap()
returns the set of declared prefix -> namespace mappings.
|
void |
setDefaultNamespace(String namespaceURI)
Defines the default namespace.
|
void |
setDefaultPrefixes(Map prefixMap) |
void |
setNamespaceMap(Map namespaces)
Defines the set of predeclared prefix -> namespace mappings
|
void |
setPrefix(String prefix,
String namespaceURI)
Defines the prefix to be used for elements in the identified namespace.
|
void |
writeAttribute(String namespaceURI,
String localName,
QName value)
writes an attribute that has a QName value to the preceeding start tag, binding the namespaces if necessary.
|
void |
writeAttribute(String namespaceURI,
String localName,
String value)
writes an attribute to the preceeding start tag, binding the namespaces if necessary.
|
void |
writeCharacters(QName value)
writes the QName as CharacterData node to the document.
|
void |
writeCharacters(String value)
writes a CharacterData node to the document.
|
void |
writeEndElement()
Writes the end tag for the current Element.
|
void |
writeStartElement(String namespaceURI,
String localName)
writes a Start tag for an element with the provided QName, binding the namespaces if necessary.
|
void writeStartElement(String namespaceURI, String localName) throws XMLWriterRuntimeException
namespaceURI - localName - XMLWriterRuntimeExceptionvoid writeAttribute(String namespaceURI, String localName, String value) throws XMLWriterRuntimeException, IllegalStateException
namespaceURI - localName - value - XMLWriterRuntimeExceptionIllegalStateExceptionvoid writeAttribute(String namespaceURI, String localName, QName value) throws XMLWriterRuntimeException, IllegalStateException
namespaceURI - localName - value - XMLWriterRuntimeExceptionIllegalStateExceptionvoid writeCharacters(String value) throws XMLWriterRuntimeException
value - XMLWriterRuntimeExceptionvoid writeCharacters(QName value) throws XMLWriterRuntimeException, IllegalStateException
value - XMLWriterRuntimeExceptionIllegalStateException - if the namespace has not been bound.void writeEndElement()
throws XMLWriterRuntimeException
XMLWriterRuntimeExceptionvoid setPrefix(String prefix, String namespaceURI) throws XMLWriterRuntimeException
namespaceURI - prefix - XMLWriterRuntimeExceptionvoid setDefaultNamespace(String namespaceURI) throws XMLWriterRuntimeException
namespaceURI - XMLWriterRuntimeExceptionvoid setDefaultPrefixes(Map prefixMap)
Map getNamespaceMap()
void setNamespaceMap(Map namespaces)
namespaces - void flush()
throws XMLWriterRuntimeException
XMLWriterRuntimeExceptionvoid close()
throws XMLWriterRuntimeException
XMLWriterRuntimeException