23#include <libxml2/libxml/tree.h>
24#include <libxml2/libxml/xpath.h>
25#include <libxml2/libxml/xpathInternals.h>
27#include <boost/tokenizer.hpp>
58 bool createDoc(
const std::string& filePath);
72 xmlXPathObjectPtr
getNodeSet(
const std::string& xPathString);
81 static std::vector<xmlNodePtr>
getNodesByName(xmlNodePtr startNode,
const std::string& nodeName);
91 const std::string& variablePath,
const std::string& seperator =
"/");
This class support any file interaction with a xml file.
static std::vector< xmlNodePtr > getNodesByName(xmlNodePtr startNode, const std::string &nodeName)
This methode return a list of all nodes with the given name nodeName starting by the given startNode.
bool createDoc(const std::string &filePath)
This methode set a document pointer to the file it ist given by the file path.
xmlXPathObjectPtr getNodeSet(const std::string &xPathString)
This methode return a pointer of a xPath element depending of the given xPathString.
~xml_file_handler()
Destructor of the class, frees the document and clean the parser.
static std::string getContentFromNode(xmlNode *node)
This methode returns the value between a xml tag.
static std::vector< std::string > parseVariablePath(const std::string &variablePath, const std::string &seperator="/")
This methode splitt a given string bey the given seperators.
static std::string getAttributeValueFromNode(xmlNode *node, const std::string &attributeName)
This methode returns a value of the given attribute from the given node you want to know.
bool isDocSetted()
This Methode check if a document is currently setted.