38 #ifndef vpXmlParser_HH
39 #define vpXmlParser_HH
46 #include <visp3/core/vpConfig.h>
50 #include <visp3/core/vpException.h>
52 #include <libxml/parser.h>
190 virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)=0;
201 virtual void writeMainClass(xmlNodePtr node)=0;
203 bool xmlReadBoolChild (xmlDocPtr doc, xmlNodePtr node);
204 char* xmlReadCharChild (xmlDocPtr doc, xmlNodePtr node);
205 double xmlReadDoubleChild (xmlDocPtr doc, xmlNodePtr node);
206 float xmlReadFloatChild (xmlDocPtr doc, xmlNodePtr node);
207 int xmlReadIntChild (xmlDocPtr doc, xmlNodePtr node);
208 std::string xmlReadStringChild (xmlDocPtr doc, xmlNodePtr node);
209 unsigned int xmlReadUnsignedIntChild (xmlDocPtr doc, xmlNodePtr node);
211 void xmlWriteBoolChild(xmlNodePtr node,
const char* label,
const bool value);
212 void xmlWriteCharChild(xmlNodePtr node,
const char* label,
const char* value);
213 void xmlWriteDoubleChild(xmlNodePtr node,
const char* label,
const double value);
214 void xmlWriteFloatChild(xmlNodePtr node,
const char* label,
const float value);
215 void xmlWriteIntChild(xmlNodePtr node,
const char* label,
const int value);
216 void xmlWriteStringChild(xmlNodePtr node,
const char* label,
const std::string& value);
217 void xmlWriteUnsignedIntChild(xmlNodePtr node,
const char* label,
const unsigned int value);
238 void parse(
const std::string& filename);
239 void save(
const std::string& filename,
const bool append=
false);
284 void setMap(
const std::map<std::string, int>& _map){ nodeMap = _map;}
293 inline void setMainTag(
const std::string& tag){ main_tag = tag;}
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