
xdmp.path( node as Node, [include-document as Boolean?] ) as String
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 /...
|
var arg = fn.head(xdmp.unquote('<a><b><c>ccc</c></b> <b>bbb</b></a>')
).root;
xdmp.path(arg.xpath("./b[1]/c"));
=> "/a/b[1]/c"
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.