File xml_interface.hpp
This file contains an XML Interface class, which re-interpretates the c style libxml2 interface and maps them to C++ elements. It is meant to parse an XML through the use of XPATH.
- Author
Benjamin Lindner ben@benlabs.net
- Version
See VERSION in CMakeLists.txt
- Copyright
GNU General Public License
-
class XMLElement
- #include <xml_interface.hpp>
Models a XML node and provides convenience functions to access its properties.
Public Functions
-
XMLElement(xmlNodePtr ptr)
-
inline void set(xmlNodePtr ptr)
-
inline xmlElementType type()
-
inline xmlNodePtr get_node_ptr()
Public Members
-
std::vector<XMLElement> children
Private Members
-
xmlNodePtr node_ptr
-
XMLElement(xmlNodePtr ptr)
-
class XMLInterface
- #include <xml_interface.hpp>
Models a XML file and allows access through XPATH.
Public Functions
-
~XMLInterface()
-
std::vector<XMLElement> get(const char *xpathexp)
-
std::vector<XMLElement> get(std::string xpathexp)
-
template<class convT>
convT get_value(const char *xpathexp) Provides type safe access to content element in XML files through XPATH.
-
bool exists(const char *xpathexp)
-
inline void set_current(XMLElement thisel)
-
~XMLInterface()