#include <xml_document.h>
|
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. Will throw exception of type mip::BadInputError if xml nodes cannot be parsed, there is an invalid encoding, or the xpath cannot be interpreted.
|
|
virtual std::string | GetXmlContent () const =0 |
| Parse an xml formatted buffer into an xmldocument.
|
|
virtual std::shared_ptr< XmlNode > | GetRootNode () const =0 |
| Get the node that is an ancestor of all other nodes.
|
|
Interface to interact with XML document.
◆ 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
-
xpath | The path to search the xml document for the node |
node | Specify 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: