public class StaxWriter extends AbstractXmlWriter
| Constructor and Description |
|---|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out) |
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
boolean writeEnclosingDocument,
boolean namespaceRepairingMode)
Allows a StaxWriter to be created for partial XML output
|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
boolean writeEnclosingDocument,
boolean namespaceRepairingMode,
NameCoder nameCoder)
Allows a StaxWriter to be created for partial XML output
|
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
boolean writeEnclosingDocument,
boolean namespaceRepairingMode,
XmlFriendlyReplacer replacer)
Deprecated.
As of 1.4 use
StaxWriter(QNameMap, XMLStreamWriter, boolean, boolean, NameCoder)
instead |
StaxWriter(QNameMap qnameMap,
XMLStreamWriter out,
NameCoder nameCoder)
Allows a StaxWriter to be created for partial XML output
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value) |
void |
close()
Call this method when you're finished with me
|
void |
endNode() |
void |
flush()
Flush the writer, if necessary.
|
protected QNameMap |
getQNameMap() |
protected XMLStreamWriter |
getXMLStreamWriter() |
boolean |
isNamespaceRepairingMode()
Is StAX namespace repairing mode on or off?
|
void |
setValue(String text)
Write the value (text content) of the current node.
|
void |
startNode(String name) |
escapeXmlNameencodeAttribute, encodeNode, startNode, underlyingWriterpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out) throws XMLStreamException
XMLStreamExceptionpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, NameCoder nameCoder) throws XMLStreamException
qnameMap - is the mapper of Java class names to QNamesout - the stream to output tonameCoder - the xml-friendly replacer to escape Java namesXMLStreamException - if the events could not be written to the outputpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode, NameCoder nameCoder) throws XMLStreamException
qnameMap - is the mapper of Java class names to QNamesout - the stream to output towriteEnclosingDocument - a flag to indicate whether or not the start/end document
events should be writtennamespaceRepairingMode - a flag to enable StAX' namespace repairing modenameCoder - the xml-friendly replacer to escape Java namesXMLStreamException - if the events could not be written to the outputpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode) throws XMLStreamException
qnameMap - is the mapper of Java class names to QNamesout - the stream to output towriteEnclosingDocument - a flag to indicate whether or not the start/end document
events should be writtenXMLStreamException - if the events could not be written to the outputpublic StaxWriter(QNameMap qnameMap, XMLStreamWriter out, boolean writeEnclosingDocument, boolean namespaceRepairingMode, XmlFriendlyReplacer replacer) throws XMLStreamException
StaxWriter(QNameMap, XMLStreamWriter, boolean, boolean, NameCoder)
insteadqnameMap - is the mapper of Java class names to QNamesout - the stream to output towriteEnclosingDocument - a flag to indicate whether or not the start/end document
events should be writtenreplacer - the xml-friendly replacer to escape Java namesXMLStreamException - if the events could not be written to the outputpublic void flush()
HierarchicalStreamWriterpublic void close()
public void endNode()
public void setValue(String text)
HierarchicalStreamWriterpublic void startNode(String name)
public boolean isNamespaceRepairingMode()
protected QNameMap getQNameMap()
protected XMLStreamWriter getXMLStreamWriter()
Copyright © 2004-2014 XStream. All Rights Reserved.