Go to the source code of this file.
◆ IMPLEMENT_CLASSINFO() [1/6]
Definition at line 64 of file XMLParser.cpp.
68{
69#ifdef XML_UNICODE_WCHAR_T
70 String name = _name;
71 StringStringArray attrs;
72 while (*_attrs) {
73 String key = *_attrs++;
74 String value = *_attrs++;
76 }
77#else
79 String name = decoder.decode(_name);
80 StringStringArray attrs;
81 while (*_attrs) {
82 String key = decoder.decode(*_attrs++);
83 String value = decoder.decode(*_attrs++);
85 }
86#endif
88 pHandler->startElement(name, attrs);
89}
◆ IMPLEMENT_CLASSINFO() [2/6]
Definition at line 281 of file XMLParser.cpp.
284{
285 String s;
286 if (__pTopElement)
287 s = __pTopElement->toString();
288 return s;
289}
290
291
293{
294 __pCurrentElement =
NULL;
295 __pTopElement =
NULL;
296}
◆ IMPLEMENT_CLASSINFO() [3/6]
Definition at line 196 of file XMLParser.cpp.
199{
201
202 r.append(
__T(
"<")).append(__name);
203
204 for (StringStringArray::ConstIterator it = __attrs.begin();
205 it != __attrs.end(); it++) {
206 r.append(
__T(
" ")).append((*it).key).append(
__T(
"=\""))
207 .append(String::escape((*it).value, (*it).value.length(), String::ESCAPE_XML))
209 }
210
211 if (__children.isEmpty()) {
213 }
214 else {
216 .append(innerXml())
217 .append(
__T(
"</")).append(__name).append(
__T(
">"));
218 }
219
221}
222
223
225 const String& _name, const StringStringArray& _attrs)
227{
228 __name = _name;
229 __attrs = _attrs;
230}
XmlElement(XmlNode *_pParentNode, const String &_name, const StringStringArray &_attrs)
◆ IMPLEMENT_CLASSINFO() [4/6]
Definition at line 39 of file XMLParser.cpp.
42{
43 const XML_LChar* psz = XML_ErrorString(XML_GetErrorCode(_parser));
44 const wchar_t* wpsz =
NULL;
45#ifdef XML_UNICODE_WCHAR_T
46 wpsz = psz;
47#else
49 String str = decoder.decode(psz);
50 wpsz = str.data();
51#endif
52 __message = String::format(
53 __T(
"%ls at line %d"),
54 wpsz,
55 XML_GetCurrentLineNumber(_parser)
56 );
57}
◆ IMPLEMENT_CLASSINFO() [5/6]
◆ IMPLEMENT_CLASSINFO() [6/6]