MarkLogic Server 11.0 Product Documentation
xdmp.documentSetProperties

xdmp.documentSetProperties(
   uri as String,
   props as Node[]
) as null

Summary

Sets the properties of a document to the given sequence of elements, replacing any properties that already exist on the document. To preserve existing document properties, use xdmp:document-add-properties. Each element QName is the property name and the element value is the property value. Modifying properties requires update permissions on a document.

Parameters
uri The URI of the document.
props The properties to set. Replaces any properties already set on the document.

Example

declareUpdate();
var props = [fn.head(xdmp.unquote('<priority>1</priority>')).root,
             fn.head(xdmp.unquote('<status>unedited</status>')).root];
xdmp.documentSetProperties(
       "/example.json", props);
=> ()
Powered by MarkLogic Server | Terms of Use | Privacy Policy