Revision [228]

This is an old revision of CommandXquery made by DavidLee on 2008-06-12 17:11:13.

 

Command xquery


Name

xquery evaluate an XQUERY expression and print the result

Synopsis

xquery [-qf xquery-file] [-V] [-q xquery-expr] [-i input-file] [-n] [xquery-expr] [var value [var value]]

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 xquery-expr
-n do not use a source context
-V if -V is given then the remaining args are treated as name/value pairs and assigned to xquery external variables
xquery-expr xquery expression

If no -q or -qf is given then the next argument is treated as the xquery expression/script.

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 1


CategoryCommands

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki