Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp.path

xdmp.path(
   node as Node,
   [include-document as Boolean?]
) as 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

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 iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.