<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.documentForest.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.documentForest</api:function-name><api:suggest>xdmp.documentforest</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>documentforest</api:suggest><api:function-link mode="xquery" fullname="xdmp:document-forest">/apidoc/8.0/xdmp:document-forest.xml</api:function-link><api:function mode="javascript" name="documentForest" type="builtin" lib="xdmp" category="Extension" subcategory="MarkLogic Server" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.documentForest"><api:summary>
  Returns the forest ID of the forest in which a document (or a lock or a
  property) with the specified URI is stored.   Otherwise, returns the empty
  sequence.
</api:summary><api:params><api:param name="uri" type="xs:string"><api:param-description>
    The URI of the document, lock, or property.
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="forest-ids" type="xs:unsignedLong*" optional="true"><api:param-description>
    Restricts the ID(s) of the forest(s) in which this function may return.
  </api:param-description><api:param-name>forest-ids</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>String?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.documentForest("example.xml");
=&gt; 12972338785465832200
</pre></api:example></api:function></api:function-page>