1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
6 * Created on: Mar 14, 2014
10 #ifndef CONFIG_XMLREADER_H_
11 #define CONFIG_XMLREADER_H_
13 #include <Config_def.h>
18 //>> Forward declaration of xmlNodePtr.
19 typedef struct _xmlNode xmlNode;
20 typedef xmlNode *xmlNodePtr;
24 //>> Forward declaration of xmlDocPtr.
25 typedef struct _xmlDoc xmlDoc;
26 typedef xmlDoc *xmlDocPtr;
31 * \class Config_XMLReader
32 * \brief Base class for all libxml readers. Provides high-level API
33 * for all xml operations.
35 class Config_XMLReader
38 CONFIG_EXPORT Config_XMLReader(const std::string& theXmlFile);
39 CONFIG_EXPORT virtual ~Config_XMLReader();
41 CONFIG_EXPORT void readAll();
44 CONFIG_EXPORT xmlNodePtr findRoot();
47 virtual void processNode(xmlNodePtr aNode);
48 virtual bool processChildren(xmlNodePtr aNode);
50 void readRecursively(xmlNodePtr theParent);
52 xmlNodePtr node(void* theNode);
53 std::string getNodeName(xmlNodePtr theNode);
54 void processValidator(xmlNodePtr theNode);
55 void processSelectionFilter(xmlNodePtr theNode);
58 std::string myCurrentFeature;
61 std::string myDocumentPath;
65 #endif /* CONFIG_XMLREADER_H_ */