public interface XMLEventWriter extends XMLEventConsumer
| Modifier and Type | Method and Description |
|---|---|
void |
add(XMLEvent event)
Adds the specified event to this writer.
|
void |
add(XMLEventReader reader)
Adds the specified XML stream to this writer.
|
void |
close()
Frees any resources used by this writer.
|
void |
flush()
Ensures that any cached events are written to the underlying output
sink.
|
NamespaceContext |
getNamespaceContext()
Returns the namespace context.
|
String |
getPrefix(String uri)
Returns the namespace prefix the specified URI is currently associated
with.
|
void |
setDefaultNamespace(String uri)
Sets the current default namespace URI.
|
void |
setNamespaceContext(NamespaceContext context)
Sets the namespace context for managing namespace prefixes and URIs.
|
void |
setPrefix(String prefix,
String uri)
Associates the given namespace prefix and URI.
|
void flush() throws XMLStreamException
XMLStreamExceptionvoid close() throws XMLStreamException
XMLStreamExceptionvoid add(XMLEvent event) throws XMLStreamException
add in interface XMLEventConsumerXMLStreamExceptionvoid add(XMLEventReader reader) throws XMLStreamException
next on the given argument
while hasNext returns true.XMLStreamExceptionString getPrefix(String uri) throws XMLStreamException
XMLStreamExceptionvoid setPrefix(String prefix, String uri) throws XMLStreamException
XMLStreamExceptionvoid setDefaultNamespace(String uri) throws XMLStreamException
XMLStreamExceptionvoid setNamespaceContext(NamespaceContext context) throws XMLStreamException
XMLStreamExceptionNamespaceContext getNamespaceContext()