blob: c6e8829ad665e267b975eaf14ae5b4dd5593e856 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// MyXml.h
#ifndef __MYXML_H
#define __MYXML_H
#include "MyString.h"
struct CXmlProp
{
AString Name;
AString Value;
};
class CXmlItem
{
bool ParseItems(const AString &s, int &pos, int numAllowedLevels);
public:
AString Name;
bool IsTag;
CObjectVector<CXmlProp> Props;
CObjectVector<CXmlItem> SubItems;
bool ParseItem(const AString &s, int &pos, int numAllowedLevels);
bool IsTagged(const AString &tag) const;
int FindProperty(const AString &propName) const;
AString GetPropertyValue(const AString &propName) const;
AString GetSubString() const;
int FindSubTag(const AString &tag) const;
AString GetSubStringForTag(const AString &tag) const;
};
struct CXml
{
CXmlItem Root;
bool Parse(const AString &s);
};
#endif
|