Wiki source for FunctionStAXnewEventReader

Show raw source

=====Function newEventReader=====

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

**newEventReader** creates a new ""StAX"" [[ XMLEventReader]] Object

newEventReader( [ uri ] )


newEventReader creates an instance of a ""StAX"" [[ 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.

import commands stax=stax
reader=stax:newEventReader( file.xml )

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