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 |
writeKeyInfo(XMLStreamWriter writer,
KeyInfoType keyInfo) |
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 - ProcessingExceptionpublic static XMLEventWriter getXMLEventWriter(OutputStream outStream) throws ProcessingException
XMLEventWriteroutStream - ProcessingExceptionpublic static XMLStreamWriter getXMLStreamWriter(OutputStream outStream) throws ProcessingException
XMLStreamWriteroutStream - ProcessingExceptionpublic static XMLStreamWriter getXMLStreamWriter(Writer writer) throws ProcessingException
XMLStreamWriterwriter - WriterProcessingExceptionpublic static XMLStreamWriter getXMLStreamWriter(Result result) throws ProcessingException
ProcessingExceptionpublic static void setPrefix(XMLStreamWriter writer, String prefix, String nsURI) throws ProcessingException
writer - prefix - nsURI - ProcessingExceptionpublic static void writeAttribute(XMLStreamWriter writer, String attributeName, QName attributeValue) throws ProcessingException
writer - attributeName - QName of the attributeattributeValue - ProcessingExceptionpublic static void writeAttribute(XMLStreamWriter writer, QName attributeName, String attributeValue) throws ProcessingException
writer - attributeName - QName of the attributeattributeValue - ProcessingExceptionpublic static void writeAttribute(XMLStreamWriter writer, String localName, String value) throws ProcessingException
writer - localName - localpartvalue - value of the attributeProcessingExceptionpublic static void writeAttribute(XMLStreamWriter writer, String localName, String type, String value) throws ProcessingException
writer - localName - localparttype - typically xsi:typevalue - value of the attributeProcessingExceptionpublic 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 attributeProcessingExceptionpublic static void writeCharacters(XMLStreamWriter writer, String value) throws ProcessingException
writer - value - ProcessingExceptionpublic static void writeCData(XMLStreamWriter writer, String value) throws ProcessingException
writer - value - ProcessingExceptionpublic static void writeDefaultNameSpace(XMLStreamWriter writer, String ns) throws ProcessingException
writer - ns - ProcessingExceptionpublic static void writeDOMNode(XMLStreamWriter writer, Node node) throws ProcessingException
writer - node - ProcessingExceptionpublic static void writeDOMElement(XMLStreamWriter writer, Element domElement) throws ProcessingException
writer - domElement - ProcessingExceptionpublic static void writeNameSpace(XMLStreamWriter writer, String prefix, String ns) throws ProcessingException
writer - prefix - prefixns - Namespace URIProcessingExceptionpublic static void writeStartElement(XMLStreamWriter writer, String prefix, String localPart, String ns) throws ProcessingException
writer - prefix - localPart - ns - ProcessingExceptionpublic 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 - ProcessingExceptionpublic static void writeKeyInfo(XMLStreamWriter writer, KeyInfoType keyInfo) throws ProcessingException
ProcessingExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.