Revision [149]
This is an old revision of CommandXquery made by DavidLee on 2008-05-11 16:26:20.
Command xquery
Name
xquery evaluate an XQUERY expression and print the resultSynopsis
xquery [-qf xquery-file] [-q query] [-i input-file] [-n] [-V var value [var value]] [query]Description
-qf xquery-file read xquery script from file-i input-file use input-file as the source xml document, otherwise stdin
-q query use argument as query
-n do not use a source context
-V var value 1 or more variable/value pairs. Every variable MUST be declared in the xquery script as an external variable.
xquery-expr xquery expression
Not all options are compatible. You cannot read both the query and the context from stdin.
If you supply variables then -q must be supplied.
Example
$ xls | xquery '//file[1]/@name/string()' .classpath
Return Value
Returns 0 if the the xquery expression executed successfully. otherwise 1CategoryCommands