MarkLogic Server 11.0 Product Documentation
xdmp:path

xdmp:path(
   $node as node(),
   [$include-document as xs:boolean?]
) as xs:string

Summary

Returns a string whose value corresponds to the path of the node.

Parameters
node The node whose path is returned.
include-document If true, then the path is presented with a leading doc(..)/.., otherwise the path is presented as /...

Example

let $arg := <a><b><c>ccc</c></b>
                <b>bbb</b></a>
return xdmp:path($arg/b[1]/c)

  => "/a/b[1]/c"
Powered by MarkLogic Server | Terms of Use | Privacy Policy