Wiki source for FunctionStAXcloseReader
=====Command closeReader=====
This command is part of the [[FunctionsStAX StAX]] support.
====Name====
**closeReader** Closes a ""StAX Reader"" created with [[FunctionStAXnewEventReader newEventReader]]
====Synopsis====
closeReader $reader
====Description====
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.
Example
%%
import commands stax=stax
reader=stax:newEventReader( file.xml )
while [ stax:hasNext( $reader ) ] ; do
event=stax:nextEvent( $reader ) ;
done
stax:closeReader $reader
%%
----
[[Commands]]
[[FunctionsStAX StAX Functions]]
[[FunctionStAXnewEventReader newEventReader]]
[[JavaObjects Java Objects]]
This command is part of the [[FunctionsStAX StAX]] support.
====Name====
**closeReader** Closes a ""StAX Reader"" created with [[FunctionStAXnewEventReader newEventReader]]
====Synopsis====
closeReader $reader
====Description====
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.
Example
%%
import commands stax=stax
reader=stax:newEventReader( file.xml )
while [ stax:hasNext( $reader ) ] ; do
event=stax:nextEvent( $reader ) ;
done
stax:closeReader $reader
%%
----
[[Commands]]
[[FunctionsStAX StAX Functions]]
[[FunctionStAXnewEventReader newEventReader]]
[[JavaObjects Java Objects]]