Hi Prajakata,
You can user combination of xdmp:filesystem-directory and
xdmp:filesystem-file
to load documents from your local to marklogic. xdmp:filesystem-directory
will read an directory or folder .After loading,fetch path name from output
and pass it to to xdmp:filesystem-file to read file.It will read your file
For small or medium file, below query can help
let
$documents:=("AdministrativeDecisions-Combined.xml","LS.CAAdministrativeDecisions.xml","LS.CACaseCitators.xml","LS.CACaseCitators-Combined.xml","LS.CACases.xml",
"LS.CACases-Combined.xml","LS.CACaseSummaries-Combined.xml","LS.CACaseSummaries.xml","LS.CACombinedCases-Combined.xml","LS.CAConstitutions.xml",
"LS.CADictionaries.xml","LS.CADraftingCommentary.xml",
for $i in $sachin
let $path:=fn:concat("/nfs/home02/sharmas7/SNR5.1/CACASES/",$i)
let $tar:=fn:concat("/test/sachin/",$i)
return
xdmp:document-load($path,
<options xmlns="xdmp:document-load">
<uri>{$tar}</uri>
<repair>none</repair>
<permissions>{(xdmp:permission("reader-nl", "read"),
xdmp:permission("writer-nl", "update"),
xdmp:permission("writer-nl", "insert"),
xdmp:permission("executor-nl", "execute"))
}</permissions>
</options>)
Regards
Sachin Sharma
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general