version 1.18.6.2, 2003/08/13 19:39:51
|
version 1.18.6.4, 2003/08/14 18:31:23
|
|
|
"Semantic error" | "Semantic error" |
}; | }; |
| |
|
|
static const char* _xmlKeys[] = | static const char* _xmlKeys[] = |
{ | { |
"Common.XmlParser.BAD_START_TAG", | "Common.XmlParser.BAD_START_TAG", |
|
|
| |
Boolean XmlParser::_getElementName(char*& p) | Boolean XmlParser::_getElementName(char*& p) |
{ | { |
if (!String::isUTF8(p)) |
if (!String::isUTF8(p) || |
|
!(((*p >= 'A') && (*p <= 'Z')) || |
|
((*p >= 'a') && (*p <= 'z')) || |
|
(*p == '_'))) |
throw XmlException(XmlException::BAD_START_TAG, _line); | throw XmlException(XmlException::BAD_START_TAG, _line); |
|
p++; |
| |
while ((*p) && | while ((*p) && |
(((*p >= 'A') && (*p <= 'Z')) || | (((*p >= 'A') && (*p <= 'Z')) || |
((*p >= 'a') && (*p <= 'z')) || | ((*p >= 'a') && (*p <= 'z')) || |
|
((*p >= '0') && (*p <= '9')) || |
*p == '_' || *p == '-' || *p == ':' || *p == '.')) | *p == '_' || *p == '-' || *p == ':' || *p == '.')) |
p++; | p++; |
| |
|
|
{ | { |
openCloseElement = false; | openCloseElement = false; |
| |
if (!String::isUTF8(p)) |
if (!String::isUTF8(p) || |
|
!(((*p >= 'A') && (*p <= 'Z')) || |
|
((*p >= 'a') && (*p <= 'z')) || |
|
(*p == '_'))) |
throw XmlException(XmlException::BAD_START_TAG, _line); | throw XmlException(XmlException::BAD_START_TAG, _line); |
|
p++; |
| |
while ((*p) && | while ((*p) && |
(((*p >= 'A') && (*p <= 'Z')) || | (((*p >= 'A') && (*p <= 'Z')) || |
((*p >= 'a') && (*p <= 'z')) || | ((*p >= 'a') && (*p <= 'z')) || |
|
((*p >= '0') && (*p <= '9')) || |
*p == '_' || *p == '-' || *p == ':' || *p == '.')) | *p == '_' || *p == '-' || *p == ':' || *p == '.')) |
p++; | p++; |
| |
|
|
| |
void XmlParser::_getAttributeNameAndEqual(char*& p) | void XmlParser::_getAttributeNameAndEqual(char*& p) |
{ | { |
if (!String::isUTF8(p)) |
if (!String::isUTF8(p) || |
|
!(((*p >= 'A') && (*p <= 'Z')) || |
|
((*p >= 'a') && (*p <= 'z')) || |
|
(*p == '_'))) |
throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line); | throw XmlException(XmlException::BAD_ATTRIBUTE_NAME, _line); |
|
p++; |
| |
while ((*p) && | while ((*p) && |
(((*p >= 'A') && (*p <= 'Z')) || | (((*p >= 'A') && (*p <= 'Z')) || |
((*p >= 'a') && (*p <= 'z')) || | ((*p >= 'a') && (*p <= 'z')) || |
|
((*p >= '0') && (*p <= '9')) || |
*p == '_' || *p == '-' || *p == ':' || *p == '.')) | *p == '_' || *p == '-' || *p == ':' || *p == '.')) |
p++; | p++; |
| |
|
|
| |
return; | return; |
} | } |
else if (String::isUTF8(p)) |
else if (String::isUTF8(p) && |
|
(((*p >= 'A') && (*p <= 'Z')) || |
|
((*p >= 'a') && (*p <= 'z')) || |
|
(*p == '_'))) |
{ | { |
entry.type = XmlEntry::START_TAG; | entry.type = XmlEntry::START_TAG; |
entry.text = p; | entry.text = p; |