Revision [1724]

Last edited on 2011-05-31 13:02:17 by DavidLee
Additions:
stax:writeStartElement $w foo
stax:writeAttribute $w a1 value1
Result
<foo a1="value1">Some Characters</foo>
Deletions:
stax:writeStartElement $w QName( xmlsh http://www.xmlsh.org/test1 test )
stax:writeNamespace $w xmlsh2 http://www.xmlsh.org/test2
stax:writeAttribute $w QName( xmlsh2 http://www.xmlsh.org/test2 a1) value1
stax:writeComment $w "This is a comment"
stax:writeStartElement $w inner
stax:writeCData $w "This is CData"


Revision [1723]

Edited on 2011-05-31 13:00:02 by DavidLee
Additions:
Note that unlike many of the ""StAX"" functions this is a command not a function. You use the Command syntax to invoke it.
Deletions:
Note that unlike the rest of the ""StAX"" functions this is a command not a function. You use the Command syntax to invoke it.


Revision [1718]

Edited on 2011-05-31 12:36:55 by DavidLee
Additions:
[[FunctionStAXnewStreamWriter newStreamWriter]]
Deletions:
[[FunctionStAXnewEventReader newEventReader]]


Revision [1717]

Edited on 2011-05-31 12:36:23 by DavidLee
Additions:
closeWriter closes the writer created with [[FunctionStAXnewStreamWriter newStreamWriter]]. If you do not close the writer when you are through it may cause open file handles to stay open until the shell exits the current scope and garbage collection occurs.
Deletions:
closeWritercloses the writercreated with [[FunctionStAXnewStreamWriter newStreamWriter]]. If you do not close the writerwhen you are through it may cause open file handles to stay open until the shell exits the current scope and garbage collection occurs.


Revision [1716]

Edited on 2011-05-31 12:35:15 by DavidLee
Additions:
**closeReader** Closes a ""StAX Writer"" created with [[FunctionStAXnewStreamWriter newStreamWriter]]
closeWritercloses the writercreated with [[FunctionStAXnewStreamWriter newStreamWriter]]. If you do not close the writerwhen you are through it may cause open file handles to stay open until the shell exits the current scope and garbage collection occurs.
w=stax:newStreamWriter()
stax:writeStartDocument $w
stax:writeStartElement $w QName( xmlsh http://www.xmlsh.org/test1 test )
stax:writeNamespace $w xmlsh2 http://www.xmlsh.org/test2
stax:writeAttribute $w QName( xmlsh2 http://www.xmlsh.org/test2 a1) value1
stax:writeCharacters $w "Some Characters"
stax:writeComment $w "This is a comment"
stax:writeStartElement $w inner
stax:writeCData $w "This is CData"
stax:writeEndElement $w
stax:writeEndElement $w
stax:writeEndDocument $w
stax:closeWriter $w
Deletions:
**closeReader** Closes a ""StAX Writer"" created with [[FunctionStAXnewEventWriter newEventWriter]]
closeWritercloses the writercreated with [[FunctionStAXnewEventWriter newEventWriter]]. If you do not close the writerwhen you are through it may cause open file handles to stay open until the shell exits the current scope and garbage collection occurs.
reader=stax:newEventReader( file.xml )
while [ stax:hasNext( $reader ) ] ; do
event=stax:nextEvent( $reader ) ;
done
stax:closeReader $reader


Revision [1714]

The oldest known version of this page was created on 2011-05-31 12:33:25 by DavidLee
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki