MarkLogic 12 EA 1 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"}
Powered by MarkLogic Server | Terms of Use | Privacy Policy