minimc 0.5.1
Loading...
Searching...
No Matches
XMLDocument Class Reference

Validates document with Xerces-C++. Loads document with pugixml. More...

#include <XMLDocument.hpp>

Public Member Functions

 XMLDocument (const std::filesystem::path &xml_filepath)
 Loads a valid pugixml XML document. More...
 

Public Attributes

const pugi::xml_node root {doc.child("minimc")}
 Allows access to the root node of XMLDocument::doc. More...
 

Detailed Description

Validates document with Xerces-C++. Loads document with pugixml.

Todo:
Replace xs:normalizedString by xs:token or more restrictive type in schema

Constructor & Destructor Documentation

◆ XMLDocument()

XMLDocument::XMLDocument ( const std::filesystem::path &  xml_filepath)

Loads a valid pugixml XML document.

Exceptions
std::runtime_errorValidation or DOM loading failed. Gives file location and message information if validation failed.

Member Data Documentation

◆ root

const pugi::xml_node XMLDocument::root {doc.child("minimc")}

Allows access to the root node of XMLDocument::doc.

pugi::xml_node objects are only pointers to the full document. Therefore calling code must not let the owning XMLDocument to go out of scope. This member is declared after XMLDocument::doc to guarantee construction order.


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