
infodev:ingest( $document as node()?, $path as xs:string, $ticket-id as xs:string, [$policy-deltas as element(info:options)?], [$properties as element()*] ) as xs:string
[DEPRECATED] This function ingests a single document into the database specified in the ticket, according to the rules defined by the named policy and user-supplied options.
xquery version "1.0-ml";
import module namespace infodev = "http://marklogic.com/appservices/infostudio/dev"
at "/MarkLogic/appservices/infostudio/infodev.xqy";
let $document := xdmp:document-get("C:\mydocs\xmldocs\my.xml")
let $path := "/newxml/my.xml"
let $annotation := <info:annotation>Adding my.xml doc</info:annotation>
let $ticket := infodev:ticket-create($annotation, "myDB", "default", ())
let $deltas :=
<options xmlns="http://marklogic.com/appservices/infostudio">
<uri>
<literal>http://testing</literal>
<path/>
<filename/>
<literal>.</literal>
<ext/>
</uri>
</options>
return
infodev:ingest($document, $path, $ticket. $deltas)
(: loads the my.xml file, using the default policy, into the URI,
http://testing/newxml/my.xml. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.