Loading TOC...

xdmp:node-database

xdmp:node-database(
   $node as node()
) as xs:unsignedLong?

Summary

Returns the database id where the parameter is stored. If the specified node does not come from a document in a database, then xdmp:node-database returns an empty list.

Parameters
$node The node whose database is returned.

Example

xdmp:node-database(doc("http://marklogic.com/document"))
=> 18384173956586417397

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

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • This is the most efficient way to determine if a node comes from a document stored in the database, as opposed to a node constructed in memory.