Loading TOC...

MarkLogic 12 EA 2 Product Documentation
xdmp.documentGetMetadata

xdmp.documentGetMetadata(
   uri as String
) as Object?

Summary

Returns the metadata value of a given document.

Parameters
uri The document URI.

Example

// Assume you have a previously attached metadata to a document.
// For example by running a script such as the following:
//
// declareUpdate();
// xdmp.documentSetMetadata("/foo.xml",
//   {someKey: 'someValue', someOtherKey: 123});
//
// Then retrieve the metadata as follows:

xdmp.documentGetMetadata("/foo.xml")

// Returns the metadata, as a JavaScript object. For example:
//   {"someKey":"someValue", "someOtherKey":"123"}

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