Revision [227]

This is an old revision of Variables made by DavidLee on 2008-06-12 17:07:53.

 

Variables

xmlsh variables can be either strings or XML types (infoset, including sequences).
There is no limit to the size of variables besides JVM memory.
Variables are created using variable assignment (CommandAssignVariable). The type of the expression determins
if a variable is a string or XML variable. Variables can be re-assigned and this can change their type.

Example of string assignments
A=string
A="string"
A='string'
B="another $A"
C=${B}
D=$(echo yet more strings)
E=$(ls)


Example of XML assignments
A=<[<foo/>]>
A=<[1,2,3,<foo>bar</foo>]>
A=$<(xls)
DOC=<[<foo><bar>text</bar></foo>]>
T=<[<spam>{$DOC//bar}</spam>]>

There is one comment on this page. [Display comment]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki