<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.documentSetProperties.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.documentSetProperties</api:function-name><api:suggest>xdmp.documentsetproperties</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>documentsetproperties</api:suggest><api:function-link mode="xquery" fullname="xdmp:document-set-properties">/apidoc/8.0/xdmp:document-set-properties.xml</api:function-link><api:function mode="javascript" name="documentSetProperties" type="builtin" lib="xdmp" category="UpdateBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.documentSetProperties"><api: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 <code xmlns="http://www.w3.org/1999/xhtml">xdmp:document-add-properties</code>.
  Each element QName is the property name and the element value is the
  property value.  Modifying properties requires update permissions on a
  document.
</api:summary><api:params><api:param name="uri" type="xs:string"><api:param-description>
    The URI of the document.
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="props" type="element()*"><api:param-description>
    The properties to set. Replaces any properties already set on the
    document.
  </api:param-description><api:param-name>props</api:param-name><api:param-type>Node[]</api:param-type></api:param></api:params><api:return>null</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
declareUpdate();
var props = [xdmp.unquote('&lt;priority&gt;1&lt;/priority&gt;').next().value.root,
             xdmp.unquote('&lt;status&gt;unedited&lt;/status&gt;').next().value.root];
xdmp.documentSetProperties(
       "/example.json", props);
=&gt; ()
</pre></api:example></api:function></api:function-page>