version 1.46.4.2, 2008/09/17 18:31:16
|
version 1.46.4.3, 2009/02/09 11:36:51
|
|
|
| |
static inline void _normalizeElementValue( | static inline void _normalizeElementValue( |
Uint32& line, | Uint32& line, |
char*& p) |
char*& p, |
|
Uint32 &textLen) |
{ | { |
// Process one character at a time: | // Process one character at a time: |
| |
char* q = p; | char* q = p; |
|
char *start = p; |
| |
while (*p && (*p != '<')) | while (*p && (*p != '<')) |
{ | { |
|
|
{ | { |
*q = '\0'; | *q = '\0'; |
} | } |
|
textLen = (Uint32)(q - start); |
} | } |
| |
static inline void _normalizeAttributeValue( | static inline void _normalizeAttributeValue( |
|
|
// Normalize the content: | // Normalize the content: |
| |
char* start = _current; | char* start = _current; |
_normalizeElementValue(_line, _current); |
Uint32 textLen; |
|
_normalizeElementValue(_line, _current, textLen); |
| |
// Get the content: | // Get the content: |
| |
entry.type = XmlEntry::CONTENT; | entry.type = XmlEntry::CONTENT; |
entry.text = start; | entry.text = start; |
|
entry.textLen = textLen; |
| |
// Overwrite '<' with a null character (temporarily). | // Overwrite '<' with a null character (temporarily). |
| |
|
|
entry.type = XmlEntry::CDATA; | entry.type = XmlEntry::CDATA; |
entry.text = p; | entry.text = p; |
_getCData(p); | _getCData(p); |
|
entry.textLen = strlen(entry.text); |
return; | return; |
} | } |
else if (memcmp(p, "DOCTYPE", 7) == 0) | else if (memcmp(p, "DOCTYPE", 7) == 0) |