Wiki source for MarkLogicGet


Show raw source

======Mark Logic Command: get======
Gets documents from a Mark Logic server

====Synopsis====
get [options] document [document ...]


====Options====
||-c,-connect uri||Use the connection string instead of $MLCONNECT||
||-t||Use text for serialization instead of XML. Required for non-xml documents||
||-v,-verbose||Verbose error logging||
||-baseuri uri||Base URI to get||
||-m,-maxfiles n||Number of files to batch per request||
||-r,-recurse||Recursive get||
||-maxthreads n||Maximum number of threads to use||
||-t,-text||Files copied in text mode||
||-binary||Files copied in binary mode||
||-d,-directory dir||Output directory||
||-o,-output file||Output file||
||document||uri of the document to get||


====Description====
Get documents residing on a Mark Logic server and outputs to stdout. If more then one document is specified they are output as a sequence of documents.

Documents are specified by the URI used to store the document



====Example====
Assuming the prefix "ml" is imported as the marklogic module, gets the "test.xml" document and prints to stdout

%%
ml:get test.xml
%%

====Implementation====

get is implemented as an xsh script which simply calls query. The source of the script is

%%
_opts=$<(xgetopts -a -p "c=connect:,t=text" -ps -- "$@")
shift $?

for uri ; do
:query $_opts -q "doc(\"$uri\")"
done
%%






----
[[ModuleMarkLogic MarkLogic Extension Module]]

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki