The streaming API for XML (StAX) classes / The StaxWriter class |
Methods for the xml.StaxWriter class.
Name | Description |
---|---|
xml.StaxWriter.create() RETURNING object xml.StaxWriter |
Constructor of a StaxWriter object. |
Name | Description |
---|---|
setFeature( feature STRING, value STRING ) |
Sets a feature of a StaxWriter object. |
getFeature( feature STRING ) RETURNING str STRING |
Gets a feature of a StaxWriter object. |
Name | Description |
---|---|
writeTo( url STRING ) |
Sets the output stream of the StaxWriter object to a file or an URL, and starts the streaming. |
writeToDocument( doc xml.DomDocument ) |
Sets the output stream of the StaxWriter object to an xml.DomDocument object, and starts the streaming. |
writeToText( txt TEXT ) |
Sets the output stream of the StaxWriter object to a TEXT large object, and starts the streaming. |
writeToPipe( cmd STRING ) |
Sets the output stream of the StaxWriter object to a PIPE, and starts the streaming. |
close() |
Closes the StaxWriter streaming, and releases all associated resources. |
Name | Description |
---|---|
startDocument( encoding STRING, version STRING, standalone INTEGER ) |
Writes an XML declaration to the StaxWriter stream. |
endDocument() |
Closes any open tags and writes corresponding end tags. |
dtd( data STRING ) |
Writes a DTD to the StaxWriter stream. |
Name | Description |
---|---|
setPrefix( prefix STRING, ns STRING ) |
Binds a namespace URI to a prefix. |
setDefaultNamespace( defaultNS STRING ) |
Binds a namespace URI to the default namespace. |
declareNamespace( prefix STRING, ns STRING ) |
Binds a namespace URI to a prefix, and forces the output of the XML namespace definition to the StaxWriter stream. |
declareDefaultNamespace( defaultNS STRING ) |
Binds a namespace URI to the default namespace, and forces the output of the default XML namespace definition to the StaxWriter stream. |
Name | Description |
---|---|
startElement( name STRING ) |
Writes an XML start element to the StaxWriter stream. |
startElementNS( name STRING, ns STRING ) |
Writes a namespace-qualified XML start element to the StaxWriter stream. |
emptyElement( name STRING ) |
Writes an empty XML element to the StaxWriter stream. |
emptyElementNS( name STRING, ns STRING ) |
Writes an empty namespace qualified XML element to the StaxWriter stream. |
endElement() |
Writes an end tag to the StaxWriter stream relying on the internal state to determine the prefix and local name of the last START_ELEMENT. |
attribute( name STRING, value STRING ) |
Writes an XML attribute to the StaxWriter stream. |
attributeNS( name STRING, ns STRING, value STRING ) |
Writes an XML namespace qualified attribute to the StaxWriter stream. |
processingInstruction( target STRING, data STRING ) |
Writes an XML ProcessingInstruction to the StaxWriter stream |
comment( data STRING ) |
Writes an XML comment to the StaxWriter stream. |
characters( text STRING ) |
Writes an XML text to the StaxWriter stream. |
cdata( data STRING ) |
Writes an XML CData to the StaxWriter stream. |
entityRef( name STRING ) |
Writes an XML EntityReference to the StaxWriter stream. |