MDAL
|
C++ Wrapper around libxml2 library. More...
#include <mdal_xml.hpp>
Public Member Functions | |
XMLFile () | |
Create file with invalid handle. | |
~XMLFile () | |
Closes the file. | |
void | openFile (const std::string &fileName) |
Opens the XML file. | |
xmlNodePtr | getCheckChild (xmlNodePtr parent, const std::string &name, bool force=true) const |
Gets next child with a correct name if force, throws an exception if not found. | |
xmlNodePtr | getCheckSibling (xmlNodePtr parent, const std::string &name, bool force=true) const |
Gets next sibling with a correct name if force, throws an exception if not found. | |
xmlNodePtr | getCheckRoot (const std::string &name) const |
Gets root element and check that has correct name. | |
bool | checkAttribute (xmlNodePtr parent, const std::string &name, const std::string &expectedVal) const |
Checks if attribute matches the string. | |
void | checkAttribute (xmlNodePtr parent, const std::string &name, const std::string &expectedVal, const std::string &err) const |
Checks if attribute matches the string. Throws if not. | |
void | checkEqual (const xmlChar *xmlString, const std::string &str, const std::string &err) const |
Checks strings are equal. Throws exception. | |
bool | checkEqual (const xmlChar *xmlString, const std::string &str) const |
Checks strings are equal. | |
std::string | attribute (xmlNodePtr node, std::string name) const |
Gets string attribute. | |
double | queryDoubleAttribute (xmlNodePtr elem, std::string name) const |
Gets double attribute. | |
size_t | querySizeTAttribute (xmlNodePtr elem, std::string name) const |
Gets size_t attribute. | |
std::string | content (xmlNodePtr node) const |
Gets element text. | |
xmlNodePtr | root () const |
Gets root element. | |
std::string | toString (const xmlChar *xmlString) const |
Converts xmlString to string. | |
C++ Wrapper around libxml2 library.