00001 #ifndef IGUANA_STUDIO_IG_XML_READER_H
00002 # define IGUANA_STUDIO_IG_XML_READER_H
00003
00004
00005
00006 # include <string>
00007 # include <vector>
00008 # include "Iguana/Studio/interface/config.h"
00009 #include <xercesc/dom/DOM.hpp>
00010
00011
00012
00013
00014
00015 class DOMDocument;
00016
00017
00018
00019
00020
00021 XERCES_CPP_NAMESPACE_USE
00022
00023 class IGUANA_STUDIO_API IgXMLReader
00024 {
00025
00026 public:
00027 IgXMLReader ();
00028 ~IgXMLReader ();
00029
00030 XERCES_CPP_NAMESPACE_QUALIFIER
00031 DOMDocument* read (const std::string &fileName);
00032 static void retrieveTexts (DOMNode* node, std::vector<std::string>& textList, bool isOnlyRoot);
00033 static DOMNode* getOneElementByTagName (DOMNode* root, XMLCh* string);
00034 static float getFloat (const std::string& str);
00035 static bool getBool (std::string value);
00036 static int isNumber (const std::string& str);
00037
00038 private:
00039 static void retrieveTexts (DOMNode* node, std::vector<std::string>& textList);
00040 const char* m_xmlFile;
00041 };
00042
00043
00044
00045
00046 #endif // IGUANA_STUDIO_IG_XML_READER_H