4 * Created on: Mar 14, 2014
8 #ifndef CONFIG_XMLREADER_H_
9 #define CONFIG_XMLREADER_H_
12 #include "Config_Message.h"
17 //Forward declaration for xmlNodePtr.
18 typedef struct _xmlNode xmlNode;
19 typedef xmlNode *xmlNodePtr;
23 class CONFIG_EXPORT Config_XMLReader {
25 Config_XMLReader(const std::string& theXmlFile);
26 virtual ~Config_XMLReader();
31 virtual void processNode(xmlNodePtr aNode);
32 virtual bool processChildren(xmlNodePtr aNode);
34 xmlNodePtr findRoot();
35 void readRecursively(xmlNodePtr theParent);
37 xmlNodePtr node(void* theNode);
38 std::string getProperty(xmlNodePtr theNode, const char* property);
40 * Please note that this function should be called with NULL last argument.
41 * In example: isNode(aNode, "type1", ["type2", ...], NULL);
42 * ", NULL" is required to use unlimited number of arguments.
43 * TODO(sbh): find a way to simplify calling this method.
45 bool isNode(xmlNodePtr theNode, const char* name, ...);
48 std::string m_DocumentPath;
51 #endif /* CONFIG_XMLREADER_H_ */