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 := (
             <record url="http://dbfeed.ured/EN0001"; mimetype="text/html"
last-modified="NA" pagerank="NA">
                 <metadata>
                      <meta name="AN" content="US0001"></meta>
                      <meta name="ANP" content="US"></meta>
                 </metadata>
              </record>,
              <record url="http://dbfeed.ured/SP0002"; mimetype="text/html"
last-modified="NA" pagerank="NA">
                  <metadata>
                     <meta name="AN" content="SP0002"></meta>
                     <meta name="ANP" content="SPAIN"></meta>
                   </metadata>
              </record>
              )

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

Reply via email to