public interface XMLWriter
The XMLWriter interface is used to write XML documents.
Concrete XMLWriters can be created using a XMLWriterFactory.
XMLWriterFactory| 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.
|
void |
setPrefixFactory(PrefixFactory factory)
Set the prefix factory to be used by this writer.
|
void |
startElement(QName name)
Write the start tag for an element.
|
void |
startElement(QName name,
String prefix)
Write the start tag for an element.
|
void |
startElement(String localName)
Write the start tag for an element.
|
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(QName name,
String value)
Write an attribute of the current element.
|
void |
writeAttribute(String localName,
String value)
Write an attribute of the current element.
|
void |
writeAttribute(String localName,
String uri,
String value)
Write an attribute of the current element.
|
void |
writeAttributeUnquoted(QName name,
String value)
Write an attribute (unquoted) of the current element.
|
void |
writeAttributeUnquoted(String localName,
String value)
Write an attribute (unquoted) 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)
Write character data within an element, skipping quoting.
|
void |
writeCharsUnquoted(String chars)
Write character data within an element, skipping quoting.
|
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.
|
void startElement(QName name)
void startElement(String localName)
void startElement(String localName, String uri, String prefix)
void writeAttribute(QName name, String value)
void writeAttribute(String localName, String value)
void writeAttribute(String localName, String uri, String value)
void writeAttributeUnquoted(QName name, String value)
void writeAttributeUnquoted(String localName, String value)
void writeAttributeUnquoted(String localName, String uri, String value)
void writeNamespaceDeclaration(String prefix, String uri)
void writeNamespaceDeclaration(String uri)
void writeChars(String chars)
void writeChars(CDATA chars)
void writeCharsUnquoted(String chars)
void writeCharsUnquoted(char[] buf,
int offset,
int len)
void writeComment(String comment)
void endElement()
PrefixFactory getPrefixFactory()
void setPrefixFactory(PrefixFactory factory)
String getURI(String prefix)
String getPrefix(String uri)
If no prefix for the given URI is in scope, return null.
void flush()
void close()
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.