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,
XmlFriendlyReplacer replacer)
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.
|
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) |
escapeXmlName, startNode, underlyingWriter
public StaxWriter(QNameMap qnameMap, XMLStreamWriter out) throws XMLStreamException
XMLStreamException
public 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
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 writtenreplacer
- the xml-friendly replacer to escape Java namesXMLStreamException
- if the events could not be written to the outputpublic void flush()
HierarchicalStreamWriter
public void close()
public void endNode()
public void setValue(String text)
HierarchicalStreamWriter
public void startNode(String name)
public boolean isNamespaceRepairingMode()
Copyright © 2016 Internet2. All rights reserved.