Loading TOC...

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"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.