public class StAXWriter extends XMLWriterBase
| Constructor and Description |
|---|
StAXWriter(OutputStream out,
String enc,
boolean declare) |
StAXWriter(OutputStream out,
String enc,
boolean declare,
XMLStreamWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the writer and its underlying stream.
|
void |
endElement()
Write the end tag for the current element.
|
void |
flush()
Flush the writer and its underlying stream.
|
String |
getPrefix(String uri)
Return a prefix for the given URI.
|
PrefixFactory |
getPrefixFactory()
Return the prefix factory in use by this writer.
|
String |
getURI(String prefix)
Return the URI for a given prefix.
|
XMLStreamWriter |
getXMLStreamWriter()
Returns the StAX XMLStreamWriter that is being used.
|
void |
setPrefixFactory(PrefixFactory factory)
Set the prefix factory to be used by this writer.
|
void |
startElement(String localName,
String uri)
Write the start tag for an element.
|
void |
startElement(String localName,
String uri,
String prefix)
Write the start tag for an element.
|
void |
writeAttribute(String localName,
String uri,
String value)
Write an attribute of the current element.
|
void |
writeAttributeUnquoted(String localName,
String uri,
String value)
Write an attribute (unquoted) of the current element.
|
void |
writeChars(CDATA chars)
Write character data within an element.
|
void |
writeChars(String chars)
Write character data within an element.
|
void |
writeCharsUnquoted(char[] buf,
int offset,
int len)
If the first character of the string is an opening bracket,
then this method assumes that the string is xml and it
parses the string to write out the correct xml representation.
|
void |
writeCharsUnquoted(String chars)
If the first character of the string is an opening bracket,
then this method assumes that the string is xml and it
parses the string to write out the correct xml representation.
|
void |
writeComment(String comment)
Write a comment within an element.
|
void |
writeNamespaceDeclaration(String uri)
Write a namespace declaration of the current element.
|
void |
writeNamespaceDeclaration(String prefix,
String uri)
Write a namespace declaration of the current element.
|
startElement, startElement, startElement, writeAttribute, writeAttribute, writeAttributeUnquoted, writeAttributeUnquotedpublic StAXWriter(OutputStream out, String enc, boolean declare)
public StAXWriter(OutputStream out, String enc, boolean declare, XMLStreamWriter writer)
public XMLStreamWriter getXMLStreamWriter()
public void startElement(String localName, String uri)
XMLWriterpublic void startElement(String localName, String uri, String prefix)
XMLWriterpublic void writeAttribute(String localName, String uri, String value)
XMLWriterpublic void writeAttributeUnquoted(String localName, String uri, String value)
XMLWriterpublic void writeChars(String chars)
XMLWriterwriteChars in interface XMLWriterwriteChars in class XMLWriterBasepublic void writeChars(CDATA chars)
XMLWriterwriteChars in interface XMLWriterwriteChars in class XMLWriterBasepublic void writeCharsUnquoted(String chars)
public void writeCharsUnquoted(char[] buf,
int offset,
int len)
public void writeComment(String comment)
XMLWriterwriteComment in interface XMLWriterwriteComment in class XMLWriterBasepublic void writeNamespaceDeclaration(String prefix, String uri)
XMLWriterpublic void writeNamespaceDeclaration(String uri)
XMLWriterpublic void endElement()
XMLWriterpublic void close()
XMLWriterpublic void flush()
XMLWriterpublic String getPrefix(String uri)
XMLWriterIf no prefix for the given URI is in scope, return null.
public String getURI(String prefix)
XMLWriterpublic PrefixFactory getPrefixFactory()
XMLWriterpublic void setPrefixFactory(PrefixFactory factory)
XMLWriterCopyright © 2017–2019 Eclipse Foundation. All rights reserved.