Wiki source for FunctionsStAX


Show raw source

======""StAX"" Functions======


The following functions are built in to xmlsh, but need to be [[CommandImport imported]]. They are not imported by default because of possible name collisions using these functions with no prefix.

These functions provide a scripting interface to the [[http://en.wikipedia.org/wiki/StAX StAX]] streaming XML API.


====Importing====
To use the ""StAX"" commands 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.

To import into the stax namespace prefix
%%
import commands stax=stax
%%

To import into the global namespace
%%
import commands stax
%%


Functions are invoked using the [[SyntaxFunctionCall Function Call Syntax]]

|=|Function|=|Description||

||[[FunctionStAXcloseWriter closeWriter]]||Closes a ""StAX"" Writer||
||[[FunctionStAXcloseReader closeReader]]||Closes a ""StAX"" Reader||
||[[FunctionStAXgetAttribute getAttribute]]||Gets an attribute value from a ""StAX"" START_ELEMENT Event||
||[[FunctionStAXgetData getData]]||Gets the Data of a ""StAX"" Event||
||[[FunctionStAXgetEventType getEventType]]||Gets event type of a ""StAX"" Event||
||[[FunctionStAXgetName getName]]||Gets name of a ""StAX"" Event as a QName||
||[[FunctionStAXgetNamespace getNamespace]]||Gets namespace URI of a ""StAX"" Event as a String||
||[[FunctionStAXhasNext hasNext]]||Advances the ""StAX"" Stream to the next matching event||
||[[FunctionStAXnextEvent nextEvent]]||Returns the next event||
||[[FunctionStAXnewEventReader newEventReader]]||Creates a new ""XMLEventReader"" object||
||[[FunctionStAXnewStreamWriter newStreamWriter]]||Creates a new ""XMLStreamWriter"" object||
||[[FunctionStAXwrite write]]||Writes XML or Text to a "StAX" writer||
||[[FunctionStAXwriteAttribute writeAttribute]]||Writes an attribute to a "StAX" writer||
||[[FunctionStAXwriteCData writeCData]]||Writes a CData section to a "StAX" writer||
||[[FunctionStAXwriteCharacters writeCharacters]]||Writes characters (text) to a "StAX" writer||
||[[FunctionStAXwriteComment writeComment]]||Writes a comment a "StAX" writer||
||[[FunctionStAXwriteDefaultNamespace writeDefaultNamespace]]||Writes a default namespace to a "StAX" writer||
||[[FunctionStAXwriteEndDocument writeEndDocument]]||Writes endDocument to a "StAX" writer||
||[[FunctionStAXwriteEndElement writeEndElement]]||Writes endElement to a "StAX" writer||
||[[FunctionStAXwriteNamespace writeNamespace]]||Writes a namespace declaration to a "StAX" writer||
||[[FunctionStAXwriteStartDocument writeStartDocument]]||Writes startDocument to a "StAX" writer||
||[[FunctionStAXwriteStartElement writeStartElement]]||Writes startElement to a "StAX" writer||






----
See Also [[Functions]]
See Also [[FunctionsXS XS Functions]]
See Also [[Commands]]
See Also [[JavaObjects Java Objects]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki