aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyXml.h
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2021-12-27 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2022-03-18 15:35:13 +0500
commitf19f813537c7aea1c20749c914e756b54a9c3cf5 (patch)
tree816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /CPP/Common/MyXml.h
parent98e06a519b63b81986abe76d28887f6984a7732b (diff)
download7zip-f19f813537c7aea1c20749c914e756b54a9c3cf5.tar.gz
7zip-f19f813537c7aea1c20749c914e756b54a9c3cf5.tar.bz2
7zip-f19f813537c7aea1c20749c914e756b54a9c3cf5.zip
'21.07'21.07
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