From 5df1af0e176e8495b33f3837691b1f922d7316f5 Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 7 Jul 2015 17:59:00 +0200 Subject: forgot to add new files --- libcore/libxmlwrapper.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 libcore/libxmlwrapper.h (limited to 'libcore/libxmlwrapper.h') diff --git a/libcore/libxmlwrapper.h b/libcore/libxmlwrapper.h new file mode 100644 index 0000000..cb1872f --- /dev/null +++ b/libcore/libxmlwrapper.h @@ -0,0 +1,45 @@ +#ifndef __LIBXMLWRAPPER_H +#define __LIBXMLWRAPPER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +#include "../views/viewhelpers.h" + +class cLibXMLWrapper { +private: + xmlParserCtxtPtr ctxt; + xmlDocPtr doc; + xmlNodePtr root; + xmlNodePtr current; + stack nodeStack; +protected: + void DeleteDocument(void); + bool ReadXMLFile(const char *path); + bool SetDocument(void); + bool Validate(void); + bool CheckNodeName(const char *name); + const char *NodeName(void); + vector ParseAttributes(void); + bool LevelDown(void); + bool LevelUp(void); + bool NextNode(void); + bool GetAttribute(string &name, string &value); + bool GetNodeValue(string &value); +public: + cLibXMLWrapper(void); + virtual ~cLibXMLWrapper(void); + static void InitLibXML(); + static void CleanupLibXML(); +}; + +#endif //__LIBXMLWRAPPER_H \ No newline at end of file -- cgit v1.2.3