public class StaxUtil extends Object
Constructor and Description |
---|
StaxUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
flush(XMLStreamWriter writer)
Flush the stream writer
|
static XMLEventWriter |
getXMLEventWriter(OutputStream outStream)
Get an
XMLEventWriter |
static XMLStreamWriter |
getXMLStreamWriter(OutputStream outStream)
Get an
XMLStreamWriter |
static XMLStreamWriter |
getXMLStreamWriter(Result result) |
static XMLStreamWriter |
getXMLStreamWriter(Writer writer)
Get an
XMLStreamWriter |
static void |
setPrefix(XMLStreamWriter writer,
String prefix,
String nsURI)
Set a prefix
|
static void |
writeAttribute(XMLStreamWriter writer,
QName attributeName,
String attributeValue)
Write an attribute
|
static void |
writeAttribute(XMLStreamWriter writer,
String attributeName,
QName attributeValue)
Write an attribute
|
static void |
writeAttribute(XMLStreamWriter writer,
String localName,
String value)
Write an xml attribute
|
static void |
writeAttribute(XMLStreamWriter writer,
String localName,
String type,
String value)
Write an xml attribute
|
static void |
writeAttribute(XMLStreamWriter writer,
String prefix,
String localName,
String type,
String value)
Write an xml attribute
|
static void |
writeCData(XMLStreamWriter writer,
String value)
Write a string as text node
|
static void |
writeCharacters(XMLStreamWriter writer,
String value)
Write a string as text node
|
static void |
writeDefaultNameSpace(XMLStreamWriter writer,
String ns)
Write the default namespace
|
static void |
writeDOMElement(XMLStreamWriter writer,
Element domElement)
Write DOM Element to the stream
|
static void |
writeDOMNode(XMLStreamWriter writer,
Node node)
Write a DOM Node to the stream
|
static void |
writeEndElement(XMLStreamWriter writer)
Write an end element.
|
static void |
writeNameSpace(XMLStreamWriter writer,
String prefix,
String ns)
Write a namespace
|
static void |
writeStartElement(XMLStreamWriter writer,
String prefix,
String localPart,
String ns)
Write a start element
|
public static void flush(XMLStreamWriter writer) throws ProcessingException
writer
- ProcessingException
public static XMLEventWriter getXMLEventWriter(OutputStream outStream) throws ProcessingException
XMLEventWriter
outStream
- ProcessingException
public static XMLStreamWriter getXMLStreamWriter(OutputStream outStream) throws ProcessingException
XMLStreamWriter
outStream
- ProcessingException
public static XMLStreamWriter getXMLStreamWriter(Writer writer) throws ProcessingException
XMLStreamWriter
writer
- Writer
ProcessingException
public static XMLStreamWriter getXMLStreamWriter(Result result) throws ProcessingException
ProcessingException
public static void setPrefix(XMLStreamWriter writer, String prefix, String nsURI) throws ProcessingException
writer
- prefix
- nsURI
- ProcessingException
public static void writeAttribute(XMLStreamWriter writer, String attributeName, QName attributeValue) throws ProcessingException
writer
- attributeName
- QName of the attributeattributeValue
- ProcessingException
public static void writeAttribute(XMLStreamWriter writer, QName attributeName, String attributeValue) throws ProcessingException
writer
- attributeName
- QName of the attributeattributeValue
- ProcessingException
public static void writeAttribute(XMLStreamWriter writer, String localName, String value) throws ProcessingException
writer
- localName
- localpartvalue
- value of the attributeProcessingException
public static void writeAttribute(XMLStreamWriter writer, String localName, String type, String value) throws ProcessingException
writer
- localName
- localparttype
- typically xsi:typevalue
- value of the attributeProcessingException
public static void writeAttribute(XMLStreamWriter writer, String prefix, String localName, String type, String value) throws ProcessingException
writer
- prefix
- prefix for the attributelocalName
- localparttype
- typically xsi:typevalue
- value of the attributeProcessingException
public static void writeCharacters(XMLStreamWriter writer, String value) throws ProcessingException
writer
- value
- ProcessingException
public static void writeCData(XMLStreamWriter writer, String value) throws ProcessingException
writer
- value
- ProcessingException
public static void writeDefaultNameSpace(XMLStreamWriter writer, String ns) throws ProcessingException
writer
- ns
- ProcessingException
public static void writeDOMNode(XMLStreamWriter writer, Node node) throws ProcessingException
writer
- node
- ProcessingException
public static void writeDOMElement(XMLStreamWriter writer, Element domElement) throws ProcessingException
writer
- domElement
- ProcessingException
public static void writeNameSpace(XMLStreamWriter writer, String prefix, String ns) throws ProcessingException
writer
- prefix
- prefixns
- Namespace URIProcessingException
public static void writeStartElement(XMLStreamWriter writer, String prefix, String localPart, String ns) throws ProcessingException
writer
- prefix
- localPart
- ns
- ProcessingException
public static void writeEndElement(XMLStreamWriter writer) throws ProcessingException
Write an end element. The stream writer keeps track of which start element needs to be closed with an end tag.
writer
- ProcessingException
Copyright © 2017 JBoss by Red Hat. All rights reserved.