~ubuntu-branches/ubuntu/precise/p7zip/precise-updates

« back to all changes in this revision

Viewing changes to CPP/Common/MyXml.h

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2009-02-14 20:12:27 UTC
  • mfrom: (1.1.11 upstream) (2.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090214201227-go63qxm9ozfdma60
Tags: 4.65~dfsg.1-1
* New upstream release.
* Remove wx2.8 Build-Depends added by mistakes (7zG is not yet
  intended to be built).
* Use dh_clean without -k.

Show diffs side-by-side

added added

removed removed

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