Wiki source for FunctionStAXcloseReader

Show raw source

=====Command closeReader=====

This command is part of the [[FunctionsStAX StAX]] support.

**closeReader** Closes a ""StAX Reader"" created with [[FunctionStAXnewEventReader newEventReader]]

closeReader $reader

closeReader closes the reader created with [[FunctionStAXnewEventReader newEventReader]]. If you do not close the reader 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 many of the ""StAX"" functions this is a command not a function. You use the Command syntax to invoke it.

import commands stax=stax
reader=stax:newEventReader( file.xml )
while [ stax:hasNext( $reader ) ] ; do
event=stax:nextEvent( $reader ) ;

stax:closeReader $reader


[[FunctionsStAX StAX Functions]]
[[FunctionStAXnewEventReader newEventReader]]

[[JavaObjects Java Objects]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki