Loading TOC...

MarkLogic 12 Product Documentation
xdmp.nodeGetInfo

xdmp.nodeGetInfo(
   node as Node,
   [output-kind as String[]]
) as 

Summary

This function returns information about the node i.e. the node-repid, uniquekey, compressed tree size and database of an input node. Database is true if the node is read from the database, false otherwise.

Parameters
node The node whose noderepid/uniqueKey is returned.
output-kind The output kind can be either:

"xml"

Return the result as a sequence of xml elements.

"json"

Return the result as a sequence of json elements

"map"

Return the result as a sequence of map values

default

The default is "json".

Example

xdmp.nodeGetInfo(cts.doc("http://marklogic.com/document"),"json");
==>
{
"compressedTreeSize": 78, 
"nodeRepId": 0, 
"nodeUniqueKey": "152469828419602699", 
"databaseNode": true
}

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