<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.path.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.path</api:function-name><api:suggest>xdmp.path</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>path</api:suggest><api:function-link mode="xquery" fullname="xdmp:path">/apidoc/8.0/xdmp:path.xml</api:function-link><api:function mode="javascript" name="path" 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.path"><api:summary>
  Returns a string whose value corresponds to the
  path of the node.
</api:summary><api:params><api:param name="node" type="node()"><api:param-description>
    The node whose path is returned.
  </api:param-description><api:param-name>node</api:param-name><api:param-type>Node</api:param-type></api:param><api:param name="include-document" type="xs:boolean?" optional="true"><api:param-description>
    If true, then the path is presented with a leading <code xmlns="http://www.w3.org/1999/xhtml">doc(..)/..</code>,
    otherwise the path is presented as <code xmlns="http://www.w3.org/1999/xhtml">/..</code>.
  </api:param-description><api:param-name>include-document</api:param-name><api:param-type>Boolean?</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">
var arg = xdmp.unquote('&lt;a&gt;&lt;b&gt;&lt;c&gt;ccc&lt;/c&gt;&lt;/b&gt; &lt;b&gt;bbb&lt;/b&gt;&lt;/a&gt;')
               .toArray()[0].root;
xdmp.path(arg.xpath("./b[1]/c"));

  =&gt; "/a/b[1]/c"
</pre></api:example></api:function></api:function-page>