aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyXml.h
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Common/MyXml.h')
-rw-r--r--CPP/Common/MyXml.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/CPP/Common/MyXml.h b/CPP/Common/MyXml.h
new file mode 100644
index 0000000..00b7113
--- /dev/null
+++ b/CPP/Common/MyXml.h
@@ -0,0 +1,43 @@
1// MyXml.h
2
3#ifndef __MY_XML_H
4#define __MY_XML_H
5
6#include "MyString.h"
7
8struct CXmlProp
9{
10 AString Name;
11 AString Value;
12};
13
14class CXmlItem
15{
16public:
17 AString Name;
18 bool IsTag;
19 CObjectVector<CXmlProp> Props;
20 CObjectVector<CXmlItem> SubItems;
21
22 const char * ParseItem(const char *s, int numAllowedLevels);
23
24 bool IsTagged(const char *tag) const throw();
25 int FindProp(const char *propName) const throw();
26 AString GetPropVal(const char *propName) const;
27 AString GetSubString() const;
28 const AString * GetSubStringPtr() const throw();
29 int FindSubTag(const char *tag) const throw();
30 AString GetSubStringForTag(const char *tag) const;
31
32 void AppendTo(AString &s) const;
33};
34
35struct CXml
36{
37 CXmlItem Root;
38
39 bool Parse(const char *s);
40 // void AppendTo(AString &s) const;
41};
42
43#endif