Revision [472]

This is an old revision of MarkLogicQuery made by DavidLee on 2009-04-10 16:38:44.


Mark Logic Command: query

query runs an 'ad hoc' xquery on a on a Mark Logic server.
"Ad hoc" means the query from the local system, but the context (xml data) comes from the Mark Logic server.


query [-c uri|-connect uri] [-t] [-v] [-q script | -f scriptfile] [varname value [varname value ...]]


Invokes a script (xquery file) residing on a Mark Logic server.
Optionally passing in variable (parameters) to the script.

-connect uri
-c uri Use the connection string instead of $MLCONNECT

-t Output result as text (instead of xml).
-v Assign variables (parameters) from the remaining arguments
-q script xquery to run passed as an argument
-f scriptfile file containing the xquery.


Assuming the prefix "ml" is imported as the marklogic module, invoke the local xquery file "test.xq" script on the server passing in a parameter "id" with the value "123"

$ ml:query-v -f test.xq id 123

Run a simple query specified on the command line
$ ml:query -q "'Hello World'"

MarkLogic Extension Module

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