Revision [1717]

This is an old revision of FunctionStAXcloseWriter made by DavidLee on 2011-05-31 12:36:23.

 

Command closeWriter


This command is part of the StAX support.

Name

closeReader Closes a StAX Writer created with newStreamWriter


Synopsis

closeReader $reader


Description

closeWriter closes the writer created with newStreamWriter. If you do not close the writer when you are through it may cause open file handles to stay open until the shell exits the current scope and garbage collection occurs.

Note that unlike the rest of the StAX functions this is a command not a function. You use the Command syntax to invoke it.


Example
import commands stax=stax

w=stax:newStreamWriter()
stax:writeStartDocument $w
stax:writeStartElement $w QName( xmlsh http://www.xmlsh.org/test1 test ) 
stax:writeNamespace $w xmlsh2 http://www.xmlsh.org/test2
stax:writeAttribute $w QName( xmlsh2 http://www.xmlsh.org/test2 a1) value1
stax:writeCharacters $w "Some Characters"
stax:writeComment $w "This is a comment"
stax:writeStartElement $w inner 
stax:writeCData $w "This is CData"
stax:writeEndElement $w
stax:writeEndElement $w
stax:writeEndDocument $w


stax:closeWriter $w




Commands
StAX Functions
newEventReader

Java Objects
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki