Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
xml::XmlDocument Class Referenceabstract

Interface to interact with XML document. More...

#include <src/api/mip/xml_document.h>

Public Member Functions

virtual std::shared_ptr< XmlNodeGetRootNode () const =0
 Get the node that is an ancestor of all other nodes.
 
virtual std::string GetXmlContent () const =0
 Parse an xml formatted buffer into an xmldocument.
 
virtual std::vector< std::shared_ptr< XmlNode > > SelectNodes (const std::string &xpath, const std::shared_ptr< XmlNode > &node=nullptr) const =0
 Get matching xml nodes from a specified xpath.
 

Detailed Description

Interface to interact with XML document.

Definition at line 49 of file xml_document.h.

Member Function Documentation

◆ GetRootNode()

virtual std::shared_ptr< XmlNode > xml::XmlDocument::GetRootNode ( ) const
pure virtual

Get the node that is an ancestor of all other nodes.

Returns
A shared_ptr to an XmlNode

◆ GetXmlContent()

virtual std::string xml::XmlDocument::GetXmlContent ( ) const
pure virtual

Parse an xml formatted buffer into an xmldocument.

Returns
A utf-8 xml formatted string of the content of this XmlDocument

◆ SelectNodes()

virtual std::vector< std::shared_ptr< XmlNode > > xml::XmlDocument::SelectNodes ( const std::string & xpath,
const std::shared_ptr< XmlNode > & node = nullptr ) const
pure virtual

Get matching xml nodes from a specified xpath.

Will throw exception of type mip::BadInputError if xml nodes cannot be parsed, there is an invalid encoding, or the xpath cannot be interpreted

Parameters
xpathThe path to search the xml document for the node
nodeSpecify children of a specific node
Returns
A vector of matching XmlNode shared pointers or an empty vector if none match

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