aboutsummaryrefslogtreecommitdiff
path: root/CPP/Common/MyXml.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CPP/Common/MyXml.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/CPP/Common/MyXml.cpp b/CPP/Common/MyXml.cpp
index e014518..a879d34 100644
--- a/CPP/Common/MyXml.cpp
+++ b/CPP/Common/MyXml.cpp
@@ -81,7 +81,7 @@ AString CXmlItem::GetSubStringForTag(const char *tag) const
81 81
82const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels) 82const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels)
83{ 83{
84 SKIP_SPACES(s); 84 SKIP_SPACES(s)
85 85
86 const char *beg = s; 86 const char *beg = s;
87 for (;;) 87 for (;;)
@@ -102,7 +102,7 @@ const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels)
102 IsTag = true; 102 IsTag = true;
103 103
104 s++; 104 s++;
105 SKIP_SPACES(s); 105 SKIP_SPACES(s)
106 106
107 beg = s; 107 beg = s;
108 for (;; s++) 108 for (;; s++)
@@ -115,11 +115,11 @@ const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels)
115 for (;;) 115 for (;;)
116 { 116 {
117 beg = s; 117 beg = s;
118 SKIP_SPACES(s); 118 SKIP_SPACES(s)
119 if (*s == '/') 119 if (*s == '/')
120 { 120 {
121 s++; 121 s++;
122 // SKIP_SPACES(s); 122 // SKIP_SPACES(s)
123 if (*s != '>') 123 if (*s != '>')
124 return NULL; 124 return NULL;
125 return s + 1; 125 return s + 1;
@@ -132,7 +132,7 @@ const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels)
132 SubItems.Clear(); 132 SubItems.Clear();
133 for (;;) 133 for (;;)
134 { 134 {
135 SKIP_SPACES(s); 135 SKIP_SPACES(s)
136 if (s[0] == '<' && s[1] == '/') 136 if (s[0] == '<' && s[1] == '/')
137 break; 137 break;
138 CXmlItem &item = SubItems.AddNew(); 138 CXmlItem &item = SubItems.AddNew();
@@ -168,11 +168,11 @@ const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels)
168 return NULL; 168 return NULL;
169 prop.Name.SetFrom(beg, (unsigned)(s - beg)); 169 prop.Name.SetFrom(beg, (unsigned)(s - beg));
170 170
171 SKIP_SPACES(s); 171 SKIP_SPACES(s)
172 if (*s != '=') 172 if (*s != '=')
173 return NULL; 173 return NULL;
174 s++; 174 s++;
175 SKIP_SPACES(s); 175 SKIP_SPACES(s)
176 if (*s != '\"') 176 if (*s != '\"')
177 return NULL; 177 return NULL;
178 s++; 178 s++;
@@ -194,7 +194,7 @@ const char * CXmlItem::ParseItem(const char *s, int numAllowedLevels)
194 194
195static const char * SkipHeader(const char *s, const char *startString, const char *endString) 195static const char * SkipHeader(const char *s, const char *startString, const char *endString)
196{ 196{
197 SKIP_SPACES(s); 197 SKIP_SPACES(s)
198 if (IsString1PrefixedByString2(s, startString)) 198 if (IsString1PrefixedByString2(s, startString))
199 { 199 {
200 s = strstr(s, endString); 200 s = strstr(s, endString);
@@ -215,7 +215,7 @@ void CXmlItem::AppendTo(AString &s) const
215 FOR_VECTOR (i, Props) 215 FOR_VECTOR (i, Props)
216 { 216 {
217 const CXmlProp &prop = Props[i]; 217 const CXmlProp &prop = Props[i];
218 s += ' '; 218 s.Add_Space();
219 s += prop.Name; 219 s += prop.Name;
220 s += '='; 220 s += '=';
221 s += '\"'; 221 s += '\"';
@@ -228,7 +228,7 @@ void CXmlItem::AppendTo(AString &s) const
228 { 228 {
229 const CXmlItem &item = SubItems[i]; 229 const CXmlItem &item = SubItems[i];
230 if (i != 0 && !SubItems[i - 1].IsTag) 230 if (i != 0 && !SubItems[i - 1].IsTag)
231 s += ' '; 231 s.Add_Space();
232 item.AppendTo(s); 232 item.AppendTo(s);
233 } 233 }
234 if (IsTag) 234 if (IsTag)
@@ -248,7 +248,7 @@ bool CXml::Parse(const char *s)
248 s = Root.ParseItem(s, 1000); 248 s = Root.ParseItem(s, 1000);
249 if (!s || !Root.IsTag) 249 if (!s || !Root.IsTag)
250 return false; 250 return false;
251 SKIP_SPACES(s); 251 SKIP_SPACES(s)
252 return *s == 0; 252 return *s == 0;
253} 253}
254 254