MarkLogic Connect
MarkLogic Connect Client API Collection
Public Member Functions | List of all members
mlclient::IDocumentNavigator Class Referenceabstract

Acts as a generic lightweight document interface. More...

#include <DocumentContent.hpp>

Inheritance diagram for mlclient::IDocumentNavigator:
mlclient::utilities::CppRestJsonDocumentNavigator mlclient::utilities::PugiXmlDocumentNavigator

Public Member Functions

virtual MLCLIENT_API IDocumentNodeat (const std::string &key) const =0
 Returns the named element or property underneath the document object. More...
 

Detailed Description

Acts as a generic lightweight document interface.

This is the core class in the Document Traversal API. A Document Navigator provides a consistent interface over both JSON and XML document content. This allows, for simple use cases, the developer to not know or care what the underlying content type is of their document.

Using this API the developer does not need to understand or know about the underlying XML or JSON libraries being used by the C++ API. This is therefore a future proofed way of handling document content.

Document Traversal is particularly useful when you don't know or care of the document format. E.g. if dealing with internal MarkLogic document structures from the REST API (like search options), or if parsing search result sets that contain document content.

Author
Adam Fowler adam..nosp@m.fowl.nosp@m.er@ma.nosp@m.rklo.nosp@m.gic.c.nosp@m.om
Since
8.0.2
Date
2016-07-30

Member Function Documentation

virtual MLCLIENT_API IDocumentNode* mlclient::IDocumentNavigator::at ( const std::string &  key) const
pure virtual

Returns the named element or property underneath the document object.

Parameters
keythe string key of the requested object
Returns
The IDocumentNode value of the requested element or property

Implemented in mlclient::utilities::PugiXmlDocumentNavigator, and mlclient::utilities::CppRestJsonDocumentNavigator.


The documentation for this class was generated from the following file: