42 #ifndef vpXmlParser_HH
43 #define vpXmlParser_HH
50 #include <visp/vpConfig.h>
54 #include <visp/vpException.h>
56 #include <libxml/parser.h>
181 std::string xmlReadStringChild (xmlDocPtr doc, xmlNodePtr node);
182 char* xmlReadCharChild (xmlDocPtr doc, xmlNodePtr node);
183 int xmlReadIntChild (xmlDocPtr doc, xmlNodePtr node);
184 unsigned int xmlReadUnsignedIntChild (xmlDocPtr doc, xmlNodePtr node);
185 double xmlReadDoubleChild (xmlDocPtr doc, xmlNodePtr node);
188 void xmlWriteStringChild(xmlNodePtr node,
const char* label,
const std::string& value);
189 void xmlWriteCharChild(xmlNodePtr node,
const char* label,
const char* value);
190 void xmlWriteIntChild(xmlNodePtr node,
const char* label,
const int value);
191 void xmlWriteUnsignedIntChild(xmlNodePtr node,
const char* label,
const unsigned int value);
192 void xmlWriteDoubleChild(xmlNodePtr node,
const char* label,
const double value);
225 void parse(
const std::string& filename);
226 void save(
const std::string& filename,
const bool append=
false);
271 void setMap(
const std::map<std::string, int>& _map){ nodeMap = _map;}
280 inline void setMainTag(
const std::string& tag){ main_tag = tag;}
293 virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)=0;
304 virtual void writeMainClass(xmlNodePtr node)=0;
void setMainTag(const std::string &tag)
void setMap(const std::map< std::string, int > &_map)
This class intends to simplify the creation of xml parser based on the libxml2 third party library...
std::map< std::string, int > nodeMap