Package com.sun.xml.rpc.streaming
Interface XMLWriter
- All Known Implementing Classes:
FastInfosetWriter,PrettyPrintingXMLWriterImpl,StAXWriter,XmlTreeWriter,XMLWriterBase,XMLWriterImpl
public interface XMLWriter
The XMLWriter interface is used to write XML documents.
Concrete XMLWriters can be created using a XMLWriterFactory.
- Author:
- JAX-RPC Development Team
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the writer and its underlying stream.voidWrite the end tag for the current element.voidflush()Flush the writer and its underlying stream.Return a prefix for the given URI.Return the prefix factory in use by this writer.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.voidWrite a namespace declaration of the current element.voidwriteNamespaceDeclaration(String prefix, String uri) Write a namespace declaration of the current element.
-
Method Details
-
startElement
Write the start tag for an element. -
startElement
Write the start tag for an element. -
startElement
Write the start tag for an element. -
startElement
Write the start tag for an element. -
startElement
Write the start tag for an element. -
writeAttribute
Write an attribute of the current element. -
writeAttribute
Write an attribute of the current element. -
writeAttribute
Write an attribute of the current element. -
writeAttributeUnquoted
Write an attribute (unquoted) of the current element. -
writeAttributeUnquoted
Write an attribute (unquoted) of the current element. -
writeAttributeUnquoted
Write an attribute (unquoted) of the current element. -
writeNamespaceDeclaration
Write a namespace declaration of the current element. -
writeNamespaceDeclaration
Write a namespace declaration of the current element. The prefix name will be generated by the PrefixFactory currently configured for this writer. -
writeChars
Write character data within an element. -
writeChars
Write character data within an element. -
writeCharsUnquoted
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
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
Set the prefix factory to be used by this writer. -
getURI
Return the URI for a given prefix. If the prefix is undeclared, return null. -
getPrefix
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.
-