diff options
author | horchi <vdr@jwendel.de> | 2017-03-23 18:45:47 +0100 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2017-03-23 18:45:47 +0100 |
commit | 38bb1e22c4770f8cd6592a50572bce21d9de9b4a (patch) | |
tree | 5949bef112f21eefe48dcfbe0df8a62efd139aeb /lib/xml.h | |
parent | ea3f8c5d050192b06cab9eaf70e19b544c09b8c5 (diff) | |
download | vdr-plugin-epg2vdr-38bb1e22c4770f8cd6592a50572bce21d9de9b4a.tar.gz vdr-plugin-epg2vdr-38bb1e22c4770f8cd6592a50572bce21d9de9b4a.tar.bz2 |
2017-03-23 version 1.1.54 (horchi)1.1.54a
Diffstat (limited to 'lib/xml.h')
-rw-r--r-- | lib/xml.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/xml.h b/lib/xml.h new file mode 100644 index 0000000..ae4a628 --- /dev/null +++ b/lib/xml.h @@ -0,0 +1,48 @@ +/* + * + * xml.h + * + * (c) 2017 Jörg Wendel + * + * This code is distributed under the terms and conditions of the + * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details. + */ + +//*************************************************************************** +// Include +//*************************************************************************** + +#include <tinyxml2.h> + +#include "common.h" + +using namespace tinyxml2; + +//*************************************************************************** +// Class cXml +//*************************************************************************** + +class cXml +{ + public: + + cXml(); + + int create(const char* rootName); + int set(const char* data); + + XMLNode* appendElement(const char* name, const char* value, XMLNode* node = 0); + XMLNode* appendElement(const char* name, int value, XMLNode* node = 0); + + XMLNode* getRoot() { return root; } + XMLElement* getFirst(XMLNode* node = 0); + XMLElement* getNext(XMLNode* node); + + const char* toText(); + + private: + + XMLDocument doc; + XMLNode* root; + XMLPrinter printer; +}; |