Mercurial > vba-clojure
diff src/win32/7zip/7z/CPP/Common/MyXml.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/Common/MyXml.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,40 @@ 1.4 +// MyXml.h 1.5 + 1.6 +#ifndef __MYXML_H 1.7 +#define __MYXML_H 1.8 + 1.9 +#include "MyString.h" 1.10 + 1.11 +struct CXmlProp 1.12 +{ 1.13 + AString Name; 1.14 + AString Value; 1.15 +}; 1.16 + 1.17 +class CXmlItem 1.18 +{ 1.19 + bool ParseItems(const AString &s, int &pos, int numAllowedLevels); 1.20 + 1.21 +public: 1.22 + AString Name; 1.23 + bool IsTag; 1.24 + CObjectVector<CXmlProp> Props; 1.25 + CObjectVector<CXmlItem> SubItems; 1.26 + 1.27 + bool ParseItem(const AString &s, int &pos, int numAllowedLevels); 1.28 + 1.29 + bool IsTagged(const AString &tag) const; 1.30 + int FindProperty(const AString &propName) const; 1.31 + AString GetPropertyValue(const AString &propName) const; 1.32 + AString GetSubString() const; 1.33 + int FindSubTag(const AString &tag) const; 1.34 + AString GetSubStringForTag(const AString &tag) const; 1.35 +}; 1.36 + 1.37 +struct CXml 1.38 +{ 1.39 + CXmlItem Root; 1.40 + bool Parse(const AString &s); 1.41 +}; 1.42 + 1.43 +#endif