[MarkLogic Dev General] how to save multiple documents to file system.
Hello all, I am new to Marklogic and would like to learn how to save document nodes to server. I have a sample code but it always save a last record has "SP0002". How can I save both records. Thanks in advance. xquery version "1.0-ml"; declare namespace html = "http://www.w3.org/1999/xhtml;; let $doc := ( http://dbfeed.ured/EN0001; mimetype="text/html" last-modified="NA" pagerank="NA"> , http://dbfeed.ured/SP0002; mimetype="text/html" last-modified="NA" pagerank="NA"> ) return xdmp:save("/output/mdr/xml/data2016.xml",$doc) ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
[MarkLogic Dev General] Marklogic - xdmp:filesystem-file
I have a text file contains a list over 2 thousands customerid. when use xdmp:filesystem-file("opt/rec/listid.txt") to make sure it can read all customer id inside a file. it returns all id as expected. "00013", "00014" "00015" However when I assigned "xdmp:filesystem-file" to a variable below, the result always zero. I could not figure out what wrong. please give me some hints or sample code. let $listID := xdmp:filesystem-file("opt/rec/listid.txt") let $uris := cts:uris( (),(), cts:and-query(( cts:collection-query("/collection/customers"), cts:element-value-query(xs:QName("meta:custid",($listID)) )) ) return count($uris) result: 0 Thanks Thichxai ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general