=====Function newEventReader===== This function is part of the [[FunctionsStAX StAX]] support. ====Name==== **newEventReader** creates a new ""StAX"" [[http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLEventReader.html XMLEventReader]] Object ====Synopsis==== newEventReader( [ uri ] ) ====Description==== newEventReader creates an instance of a ""StAX"" [[http://download.oracle.com/javase/6/docs/api/javax/xml/stream/XMLEventReader.html XMLEventReader]] object initialized to read from the standard input port, or if supplied, any URI (filename, http etc). The result object should be stored in a variable for use by other [[FunctionsStAX StAX Functions]]. This object is actually a real instance of the ""XMLEventReader"" interface, and you can use the [[JavaObjects Java Objects]] method call syntax to access it, it is easier and more efficient to use the functions in the [[FunctionsStAX StAX Functions]] which provide a higher level interface. To use the ""StAX"" functions you need to [[CommandImport import]] them into either the global namespace or a local namespace. Its recommended that you use a local namespace so that there is less chance of name collisions. Example %% import commands stax=stax reader=stax:newEventReader( file.xml ) %% ---- [[Commands]] [[FunctionsStAX StAX Functions]] [[JavaObjects Java Objects]]