<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.documentRemoveCollections.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.documentRemoveCollections</api:function-name><api:suggest>xdmp.documentremovecollections</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>documentremovecollections</api:suggest><api:function-link mode="xquery" fullname="xdmp:document-remove-collections">/apidoc/8.0/xdmp:document-remove-collections.xml</api:function-link><api:function mode="javascript" name="documentRemoveCollections" type="builtin" lib="xdmp" category="UpdateBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.documentRemoveCollections"><api:summary>
  Removes the named document from the given collections.  For each
  collection that is protected, the user must have permissions to update
  that collection or have the <code xmlns="http://www.w3.org/1999/xhtml">any-collection</code> privilege.  For each
  unprotected collection, the user must have the
  <code xmlns="http://www.w3.org/1999/xhtml">unprotected-collections</code> privilege.
</api:summary><api:params><api:param name="uri" type="xs:string"><api:param-description>
    The document URI.
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="collections" type="xs:string*"><api:param-description>
    A set of collection URIs.
  </api:param-description><api:param-name>collections</api:param-name><api:param-type>String[]</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 colls = [ "http://examples.com", "http://marklogic.com" ];
xdmp.documentRemoveCollections("/example.json", colls);
</pre></api:example></api:function></api:function-page>