This command is part of the StAX support.
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.
The writer paramter is an writer created with newStreamWriter.
The value parameters are one or more XML objects or character data.
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