Package com.sun.xml.rpc.streaming
Interface XMLWriter
-
- All Known Implementing Classes:
FastInfosetWriter,PrettyPrintingXMLWriterImpl,StAXWriter,XmlTreeWriter,XMLWriterBase,XMLWriterImpl
public interface XMLWriterThe XMLWriter interface is used to write XML documents.
Concrete XMLWriters can be created using a XMLWriterFactory.
- Author:
- JAX-RPC Development Team
- See Also:
XMLWriterFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the writer and its underlying stream.voidendElement()Write the end tag for the current element.voidflush()Flush the writer and its underlying stream.StringgetPrefix(String uri)Return a prefix for the given URI.PrefixFactorygetPrefixFactory()Return the prefix factory in use by this writer.StringgetURI(String prefix)Return the URI for a given prefix.voidsetPrefixFactory(PrefixFactory factory)Set the prefix factory to be used by this writer.voidstartElement(String localName)Write the start tag for an element.voidstartElement(String localName, String uri)Write the start tag for an element.voidstartElement(String localName, String uri, String prefix)Write the start tag for an element.voidstartElement(QName name)Write the start tag for an element.voidstartElement(QName name, String prefix)Write the start tag for an element.voidwriteAttribute(String localName, String value)Write an attribute of the current element.voidwriteAttribute(String localName, String uri, String value)Write an attribute of the current element.voidwriteAttribute(QName name, String value)Write an attribute of the current element.voidwriteAttributeUnquoted(String localName, String value)Write an attribute (unquoted) of the current element.voidwriteAttributeUnquoted(String localName, String uri, String value)Write an attribute (unquoted) of the current element.voidwriteAttributeUnquoted(QName name, String value)Write an attribute (unquoted) of the current element.voidwriteChars(CDATA chars)Write character data within an element.voidwriteChars(String chars)Write character data within an element.voidwriteCharsUnquoted(char[] buf, int offset, int len)Write character data within an element, skipping quoting.voidwriteCharsUnquoted(String chars)Write character data within an element, skipping quoting.voidwriteComment(String comment)Write a comment within an element.voidwriteNamespaceDeclaration(String uri)Write a namespace declaration of the current element.voidwriteNamespaceDeclaration(String prefix, String uri)Write a namespace declaration of the current element.
-
-
-
Method Detail
-
startElement
void startElement(QName name)
Write the start tag for an element.
-
startElement
void startElement(String localName)
Write the start tag for an element.
-
startElement
void startElement(String localName, String uri, String prefix)
Write the start tag for an element.
-
writeAttribute
void writeAttribute(QName name, String value)
Write an attribute of the current element.
-
writeAttribute
void writeAttribute(String localName, String value)
Write an attribute of the current element.
-
writeAttribute
void writeAttribute(String localName, String uri, String value)
Write an attribute of the current element.
-
writeAttributeUnquoted
void writeAttributeUnquoted(QName name, String value)
Write an attribute (unquoted) of the current element.
-
writeAttributeUnquoted
void writeAttributeUnquoted(String localName, String value)
Write an attribute (unquoted) of the current element.
-
writeAttributeUnquoted
void writeAttributeUnquoted(String localName, String uri, String value)
Write an attribute (unquoted) of the current element.
-
writeNamespaceDeclaration
void writeNamespaceDeclaration(String prefix, String uri)
Write a namespace declaration of the current element.
-
writeNamespaceDeclaration
void writeNamespaceDeclaration(String uri)
Write a namespace declaration of the current element. The prefix name will be generated by the PrefixFactory currently configured for this writer.
-
writeChars
void writeChars(String chars)
Write character data within an element.
-
writeChars
void writeChars(CDATA chars)
Write character data within an element.
-
writeCharsUnquoted
void writeCharsUnquoted(String chars)
Write character data within an element, skipping quoting.
-
writeCharsUnquoted
void writeCharsUnquoted(char[] buf, int offset, int len)Write character data within an element, skipping quoting.
-
writeComment
void writeComment(String comment)
Write a comment within an element.
-
endElement
void endElement()
Write the end tag for the current element.
-
getPrefixFactory
PrefixFactory getPrefixFactory()
Return the prefix factory in use by this writer.
-
setPrefixFactory
void setPrefixFactory(PrefixFactory factory)
Set the prefix factory to be used by this writer.
-
getURI
String getURI(String prefix)
Return the URI for a given prefix. If the prefix is undeclared, return null.
-
getPrefix
String getPrefix(String uri)
Return a prefix for the given URI.If no prefix for the given URI is in scope, return null.
-
flush
void flush()
Flush the writer and its underlying stream.
-
close
void close()
Close the writer and its underlying stream.
-
-