Revision [1666]
This is an old revision of FunctionsStAX made by DavidLee on 2011-01-04 10:55:57.
StAX Functions
The following functions are built in to xmlsh, but need to be 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 StAX streaming XML API.
Importing
To use the StAX commands you need to 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 Function Call Syntax
Function | Description |
---|
closeWriter | Closes a StAX Writer |
closeReader | Closes a StAX Reader |
getAttribute | Gets an attribute value from a StAX START_ELEMENT Event |
getData | Gets the Data of a StAX Event |
getEventType | Gets event type of a StAX Event |
getName | Gets name of a StAX Event as a QName |
getNamespace | Gets namespace URI of a StAX Event as a String |
hasNext | Advances the StAX Stream to the next matching event |
nextEvent | Returns the next event |
newEventReader | Creates a new XMLEventReader object |
newStreamWrite | Creates a new XMLStreamWriter object |
write | Writes XML or Text to a "StAX" writer |
writeAttribute | Writes an attribute to a "StAX" writer |
writeCData | Writes a CData section to a "StAX" writer |
writeCharacters | Writes characters (text) to a "StAX" writer |
writeComment | Writes a comment a "StAX" writer |
writeDefaultNamespace | Writes a default namespace to a "StAX" writer |
writeEndDocument | Writes endDocument to a "StAX" writer |
writeEndElement | Writes endElement to a "StAX" writer |
writeNamespace | Writes a namespace declaration to a "StAX" writer |
writeStartDocument | Writes startDocument to a "StAX" writer |
writeStartElement | Writes startElement to a "StAX" writer |
See Also Functions
See Also XS Functions
See Also Commands
See Also Java Objects