Loading TOC...

xdmp:document-set-metadata

xdmp:document-set-metadata(
   $uri as xs:string,
   $metadata as map:map
) as empty-sequence()

Summary

Sets metadata to the document. All existing metadata in the document will be replaced with the newly specified ones. The string value of a non-string value is used for persistence.

Parameters
$uri The document URI.
$metadata Metadata in the key value pairs to set on the document.

Example

xdmp:document-set-metadata(
    "foo.xml",
    map:map(<map:map xmlns:map=”http://marklogic.com/xdmp/map”>
      <map:entry key=”w”>
        <map:value>world</map:value>
      </map:entry>
      <map:entry key=”h”>
        <map:value>hello</map:value>
      </map:entry>
    </map:map>)))

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.