1 // MyXml.h
2 
3 #ifndef __MY_XML_H
4 #define __MY_XML_H
5 
6 #include "MyString.h"
7 
8 struct CXmlProp
9 {
10   AString Name;
11   AString Value;
12 };
13 
14 class CXmlItem
15 {
16 public:
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 
35 struct CXml
36 {
37   CXmlItem Root;
38 
39   bool Parse(const char *s);
40   // void AppendTo(AString &s) const;
41 };
42 
43 #endif
44