+
+ // Useful wrappers around libxml2 functions
+
+ // Return the value of the attribute, or an empty string if it is not defined
+ static std::string getAttrValue(xmlNodePtr node, const std::string & attrName);
+ static inline std::string xmlStrToString(const xmlChar * xmlStr);
+ static std::string getNodeContent(xmlNodePtr node);
+ template<typename T> static T getNumericalNodeContent(xmlNodePtr node);
+ static xmlNodePtr addNode(xmlNodePtr father, const std::string & name,
+ const std::string & content);
+ template<typename T> static xmlNodePtr addNumericalNode(xmlNodePtr father,
+ const std::string & name,
+ T content);
+ static void addAttr(xmlNodePtr node, const std::string & name, const std::string & value);