39 #ifndef VP_XML_PARSER_H
40 #define VP_XML_PARSER_H
42 #include <visp3/core/vpConfig.h>
46 #include <visp3/core/vpException.h>
56 typedef _xmlDoc xmlDoc;
57 typedef xmlDoc *xmlDocPtr;
60 typedef _xmlNode xmlNode;
61 typedef xmlNode *xmlNodePtr;
212 bool xmlReadBoolChild(xmlDocPtr doc, xmlNodePtr node);
213 char *xmlReadCharChild(xmlDocPtr doc, xmlNodePtr node);
214 double xmlReadDoubleChild(xmlDocPtr doc, xmlNodePtr node);
215 float xmlReadFloatChild(xmlDocPtr doc, xmlNodePtr node);
216 int xmlReadIntChild(xmlDocPtr doc, xmlNodePtr node);
217 std::string xmlReadStringChild(xmlDocPtr doc, xmlNodePtr node);
218 unsigned int xmlReadUnsignedIntChild(xmlDocPtr doc, xmlNodePtr node);
220 void xmlWriteBoolChild(xmlNodePtr node,
const char *label,
bool value);
221 void xmlWriteCharChild(xmlNodePtr node,
const char *label,
const char *value);
222 void xmlWriteDoubleChild(xmlNodePtr node,
const char *label,
double value);
223 void xmlWriteFloatChild(xmlNodePtr node,
const char *label,
float value);
224 void xmlWriteIntChild(xmlNodePtr node,
const char *label,
int value);
225 void xmlWriteStringChild(xmlNodePtr node,
const char *label,
const std::string &value);
226 void xmlWriteUnsignedIntChild(xmlNodePtr node,
const char *label,
unsigned int value);
247 void parse(
const std::string &filename);
248 void save(
const std::string &filename,
bool append =
false);
293 void setMap(
const std::map<std::string, int> &_map) { nodeMap = _map; }
302 inline void setMainTag(
const std::string &tag) { main_tag = tag; }
317 static void cleanup();
void setMainTag(const std::string &tag)
std::map< std::string, int > nodeMap
void setMap(const std::map< std::string, int > &_map)
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)=0
virtual void writeMainClass(xmlNodePtr node)=0