Revision [1721]
This is an old revision of FunctionStAXwrite made by DavidLee on 2011-05-31 12:59:14.
Command write
This command is part of the StAX support.
Name
write writes an XML node or characters to a StAX Writer created with newStreamWriterSynopsis
write value [value ...]Description
write writes XML nodes or charactor dta to a writer created with newStreamWriter.Note that unlike many of the StAX functions this is a command not a function. You use the Command syntax to invoke it.
Typically the write command is used instead of the other StAX" write commands when you want to write an XML node which was previously created instead of constructing the XML manually using individual StAX"" commands.
Example
import commands stax=stax w=stax:newStreamWriter() stax:writeStartDocument $w stax:writeStartElement $w foo stax:write $w <[ <bar>spam</bar> ]> "Text" stax:writeEndElement $w stax:writeEndDocument $w stax:closeWriter $w
Result
<foo> <bar>spam</bar>Text</foo>
Commands
StAX Functions
newStreamWriter
Java Objects