public interface StaxWriter<N>
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Calling finish will flush and close the underlying stream.
|
StaxWriter<N> |
writeAttribute(QName name,
String value)
Writes an attribute for an xml element.
|
StaxWriter<N> |
writeAttribute(String name,
String value)
Writes an attribute for an xml element.
|
StaxWriter<N> |
writeCData(String cdata)
Writes a cdata section
|
StaxWriter<N> |
writeComment(String comment)
Writes an xml comment
|
StaxWriter<N> |
writeContent(String content)
Writes xml content.
|
<V> StaxWriter<N> |
writeContent(WritableValueType<V> valueType,
V content)
Writes xml content based on the ValueType responsible for converting the content to string.
|
StaxWriter<N> |
writeDefaultNamespace(String uri)
Writes the default namespace
|
<V> StaxWriter<N> |
writeElement(N element,
String content)
Convenience method for calling
writeStartElement, writeContent, writeEndElement |
<V> StaxWriter<N> |
writeElement(N element,
WritableValueType<V> valueType,
V content)
Convenience method for calling
writeStartElement, writeContent, writeEndElement |
StaxWriter<N> |
writeEndElement()
Writes an end tag for the previously started element.
|
StaxWriter<N> |
writeNamespace(String prefix,
String uri)
Writes the namespace.
|
StaxWriter<N> |
writeStartElement(N element)
Writes the start tag of an xml element.
|
StaxWriter<N> writeStartElement(N element) throws org.staxnav.StaxNavException
element - element to startorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeAttribute(String name, String value) throws org.staxnav.StaxNavException
name - the name of the attributevalue - the value of the attributeorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeAttribute(QName name, String value) throws org.staxnav.StaxNavException
name - QName object representing the name of the attributevalue - the value of the attributeorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeContent(String content) throws org.staxnav.StaxNavException
content - content to be writtenorg.staxnav.StaxNavException - if an exception occurs<V> StaxWriter<N> writeContent(WritableValueType<V> valueType, V content) throws org.staxnav.StaxNavException
valueType - object responsible for writing content to stringcontent - content to be writtenorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeEndElement() throws org.staxnav.StaxNavException
org.staxnav.StaxNavException - if an exception occurs<V> StaxWriter<N> writeElement(N element, String content) throws org.staxnav.StaxNavException
writeStartElement, writeContent, writeEndElementelement - element to writecontent - content to be writtenorg.staxnav.StaxNavException - if an exception occurs<V> StaxWriter<N> writeElement(N element, WritableValueType<V> valueType, V content) throws org.staxnav.StaxNavException
writeStartElement, writeContent, writeEndElementelement - element to writevalueType - object responsible for writing content to stringcontent - content to be writtenorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeNamespace(String prefix, String uri) throws org.staxnav.StaxNavException
prefix - the prefix to bind the namespace touri - the uri to bind the prefix toorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeDefaultNamespace(String uri) throws org.staxnav.StaxNavException
uri - the uri to bind the default namespace toorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeComment(String comment) throws org.staxnav.StaxNavException
comment - the comment to writeorg.staxnav.StaxNavException - if an exception occursStaxWriter<N> writeCData(String cdata) throws org.staxnav.StaxNavException
cdata - content of the cdataorg.staxnav.StaxNavException - if an exception occursvoid finish()
throws org.staxnav.StaxNavException
org.staxnav.StaxNavException - if an exception occursCopyright © 2017 JBoss by Red Hat. All Rights Reserved.