<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.nodeCollections.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.nodeCollections</api:function-name><api:suggest>xdmp.nodecollections</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>nodecollections</api:suggest><api:function-link mode="xquery" fullname="xdmp:node-collections">/apidoc/8.0/xdmp:node-collections.xml</api:function-link><api:function mode="javascript" name="nodeCollections" type="builtin" lib="xdmp" category="Extension" subcategory="XQuery Context" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.nodeCollections"><api:summary>
  Returns any collections for the node's document in the database. If
  the specified node does not come from a document in a database, then
  <code xmlns="http://www.w3.org/1999/xhtml">xdmp:node-collections</code> returns an empty sequence.
</api:summary><api:params><api:param name="node" type="node()"><api:param-description>
    The node whose collections are to be returned.
   </api:param-description><api:param-name>node</api:param-name><api:param-type>Node</api:param-type></api:param></api:params><api:return class="javascript">String[]</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.nodeCollections(cts.doc("/dog.json"));
=&gt; ["http://acme.com/this-collection", "http://acme.com/that-collection"]
</pre></api:example></api:function></api:function-page>