Revision [594]

Last edited on 2009-05-30 06:29:29 by DavidLee
Additions:
[[CategoryHowTo]]


Revision [556]

Edited on 2009-05-22 20:17:28 by DavidLee
Additions:
----
[[HowTo]]


Revision [555]

Edited on 2009-05-22 20:16:07 by DavidLee
Additions:
XML variable size is only limited by the JVM memory, and works exactly the same as using standard xml processing tools such as xlst and xquery. It is no less efficient to use an XML variable for an entire document then to process it with any of the commands which also have to load the document into memory.
For example, to parse the output of the [[CommandXls xls]] command into the "mydir" variable.
====XML Process substitution====
Another way to store XML data in a variable is using xml process substitution.
This is a variant on the unix shell text process substitution $(command). An XML process substitution uses the syntax $<(command).
The difference is that XML process substitution parses the output of the command an XML document and returns it as an XML expression value.
For example, to assign the variable "mydir" from the output of the [[CommandXls xls]] command using xml process substitution.
mydir=$<(xls)
Deletions:
For example, to parse the output of the xls command into the "mydir" variable.


Revision [554]

Edited on 2009-05-22 20:11:18 by DavidLee
Additions:
====xread====
For example, to read the file "myfile.xml" into the variable "myfile"
%%
xread myfile < myfile.xml
%%
Since xread reads from standard input, it can also read from the the output of a pipeline.
For example, to parse the output of the xls command into the "mydir" variable.
%%
xls | xread mydir
%%


Revision [553]

The oldest known version of this page was created on 2009-05-22 20:08:55 by DavidLee
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki