1 #ifndef RAPIDXML_HPP_INCLUDED 2 #define RAPIDXML_HPP_INCLUDED 11 #if !defined(RAPIDXML_NO_STDLIB) 22 #pragma warning(disable : 4127) // Conditional expression is constant 28 #if defined(RAPIDXML_NO_EXCEPTIONS) 30 #define RAPIDXML_PARSE_ERROR(what, where) \ 32 parse_error_handler(what, where); \ 53 void parse_error_handler(
const char *what,
void *where);
60 #define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where) 82 virtual const char *
what()
const throw() {
return m_what; }
90 return reinterpret_cast<Ch *
>(
m_where);
104 #ifndef RAPIDXML_STATIC_POOL_SIZE 109 #define RAPIDXML_STATIC_POOL_SIZE (64 * 1024) 112 #ifndef RAPIDXML_DYNAMIC_POOL_SIZE 117 #define RAPIDXML_DYNAMIC_POOL_SIZE (64 * 1024) 120 #ifndef RAPIDXML_ALIGNMENT 127 #define RAPIDXML_ALIGNMENT sizeof(void *) 276 const int parse_full = parse_declaration_node | parse_comment_nodes |
277 parse_doctype_node | parse_pi_nodes |
290 struct lookup_tables {
291 static const unsigned char lookup_whitespace[256];
292 static const unsigned char lookup_node_name[256];
293 static const unsigned char lookup_text[256];
294 static const unsigned char lookup_text_pure_no_ws[256];
295 static const unsigned char lookup_text_pure_with_ws[256];
296 static const unsigned char 297 lookup_attribute_name[256];
298 static const unsigned char 299 lookup_attribute_data_1[256];
300 static const unsigned char 301 lookup_attribute_data_1_pure[256];
303 static const unsigned char 304 lookup_attribute_data_2[256];
305 static const unsigned char 306 lookup_attribute_data_2_pure[256];
308 static const unsigned char lookup_digits[256];
309 static const unsigned char 315 inline std::size_t measure(
const Ch *p) {
323 inline bool compare(
const Ch *p1, std::size_t size1,
const Ch *p2,
324 std::size_t size2,
bool case_sensitive) {
325 if (size1 != size2)
return false;
326 if (case_sensitive) {
327 for (
const Ch *end = p1 + size1; p1 < end; ++p1, ++p2)
328 if (*p1 != *p2)
return false;
330 for (
const Ch *end = p1 + size1; p1 < end; ++p1, ++p2)
331 if (lookup_tables<0>::lookup_upcase[static_cast<unsigned char>(*p1)] !=
332 lookup_tables<0>::lookup_upcase[static_cast<unsigned char>(*p2)])
379 template <
class Ch =
char>
383 typedef void *(alloc_func)(
385 typedef void(free_func)(
409 const Ch *
value = 0, std::size_t name_size = 0,
410 std::size_t value_size = 0) {
415 node->
name(name, name_size);
440 std::size_t name_size = 0,
441 std::size_t value_size = 0) {
446 attribute->
name(name, name_size);
448 attribute->
name(name);
472 if (size == 0) size = internal::measure(
source) + 1;
473 Ch *result =
static_cast<Ch *
>(allocate_aligned(size *
sizeof(Ch)));
475 for (std::size_t i = 0; i < size; ++i) result[i] =
source[i];
492 result->remove_all_attributes();
493 result->remove_all_nodes();
494 result->type(source->
type());
496 result = allocate_node(source->
type());
504 child = child->next_sibling())
505 result->append_node(clone_node(child));
507 attr = attr->next_attribute())
508 result->append_attribute(allocate_attribute(
509 attr->name(), attr->value(), attr->name_size(), attr->value_size()));
518 while (m_begin != m_static_memory) {
519 char *previous_begin =
520 reinterpret_cast<header *
>(align(m_begin))->previous_begin;
522 m_free_func(m_begin);
525 m_begin = previous_begin;
544 assert(m_begin == m_static_memory &&
545 m_ptr == align(m_begin));
556 m_begin = m_static_memory;
557 m_ptr = align(m_begin);
558 m_end = m_static_memory +
sizeof(m_static_memory);
562 std::size_t alignment =
565 return ptr + alignment;
574 memory = m_alloc_func(size);
578 memory =
new char[size];
579 #ifdef RAPIDXML_NO_EXCEPTIONS 585 return static_cast<char *
>(memory);
590 char *result = align(m_ptr);
593 if (result + size > m_end) {
597 if (pool_size < size) pool_size = size;
604 char *raw_memory = allocate_raw(alloc_size);
607 char *pool = align(raw_memory);
610 m_begin = raw_memory;
611 m_ptr = pool +
sizeof(
header);
612 m_end = raw_memory + alloc_size;
615 result = align(m_ptr);
619 m_ptr = result + size;
638 template <
class Ch =
char>
657 Ch *
name()
const {
return m_name ? m_name : nullstr(); }
662 std::size_t
name_size()
const {
return m_name ? m_name_size : 0; }
671 Ch *
value()
const {
return m_value ? m_value : nullstr(); }
676 std::size_t
value_size()
const {
return m_value ? m_value_size : 0; }
695 void name(
const Ch *name, std::size_t size) {
696 m_name =
const_cast<Ch *
>(name);
703 void name(
const Ch *name) { this->
name(name, internal::measure(name)); }
724 m_value =
const_cast<Ch *
>(
value);
743 static Ch zero = Ch(
'\0');
760 template <
class Ch =
char>
781 while (node->parent()) node = node->parent();
798 std::size_t name_size = 0,
799 bool case_sensitive =
true)
const {
801 if (name_size == 0) name_size = internal::measure(name);
804 if (internal::compare(attribute->name(), attribute->name_size(), name,
805 name_size, case_sensitive))
809 return this->m_parent ? m_prev_attribute : 0;
821 std::size_t name_size = 0,
822 bool case_sensitive =
true)
const {
824 if (name_size == 0) name_size = internal::measure(name);
827 if (internal::compare(attribute->name(), attribute->name_size(), name,
828 name_size, case_sensitive))
832 return this->m_parent ? m_next_attribute : 0;
855 template <
class Ch =
char>
865 : m_type(type), m_first_node(0), m_first_attribute(0) {}
896 bool case_sensitive =
true)
const {
898 if (name_size == 0) name_size = internal::measure(name);
901 if (internal::compare(child->name(), child->name_size(), name,
902 name_size, case_sensitive))
920 bool case_sensitive =
true)
const {
924 if (name_size == 0) name_size = internal::measure(name);
927 if (internal::compare(child->name(), child->name_size(), name,
928 name_size, case_sensitive))
946 bool case_sensitive =
true)
const {
947 assert(this->m_parent);
949 if (name_size == 0) name_size = internal::measure(name);
952 if (internal::compare(sibling->name(), sibling->name_size(), name,
953 name_size, case_sensitive))
957 return m_prev_sibling;
971 bool case_sensitive =
true)
const {
972 assert(this->m_parent);
974 if (name_size == 0) name_size = internal::measure(name);
977 if (internal::compare(sibling->name(), sibling->name_size(), name,
978 name_size, case_sensitive))
982 return m_next_sibling;
994 std::size_t name_size = 0,
995 bool case_sensitive =
true)
const {
997 if (name_size == 0) name_size = internal::measure(name);
1000 if (internal::compare(attribute->name(), attribute->name_size(), name,
1001 name_size, case_sensitive))
1005 return m_first_attribute;
1017 std::size_t name_size = 0,
1018 bool case_sensitive =
true)
const {
1020 if (name_size == 0) name_size = internal::measure(name);
1023 if (internal::compare(attribute->name(), attribute->name_size(), name,
1024 name_size, case_sensitive))
1028 return m_first_attribute ? m_last_attribute : 0;
1048 m_first_node->m_prev_sibling = child;
1051 m_last_node = child;
1053 m_first_node = child;
1065 m_last_node->m_next_sibling = child;
1068 m_first_node = child;
1070 m_last_node = child;
1080 assert(!where || where->
parent() ==
this);
1082 if (where == m_first_node)
1083 prepend_node(child);
1084 else if (where == 0)
1099 assert(first_node());
1113 assert(first_node());
1126 assert(where && where->
parent() ==
this);
1127 assert(first_node());
1128 if (where == m_first_node)
1129 remove_first_node();
1130 else if (where == m_last_node)
1149 assert(attribute && !attribute->
parent());
1150 if (first_attribute()) {
1152 m_first_attribute->m_prev_attribute = attribute;
1155 m_last_attribute = attribute;
1157 m_first_attribute = attribute;
1165 assert(attribute && !attribute->
parent());
1166 if (first_attribute()) {
1168 m_last_attribute->m_next_attribute = attribute;
1171 m_first_attribute = attribute;
1173 m_last_attribute = attribute;
1184 assert(!where || where->
parent() ==
this);
1185 assert(attribute && !attribute->
parent());
1186 if (where == m_first_attribute)
1187 prepend_attribute(attribute);
1188 else if (where == 0)
1189 append_attribute(attribute);
1203 assert(first_attribute());
1208 m_last_attribute = 0;
1217 assert(first_attribute());
1223 m_first_attribute = 0;
1230 assert(first_attribute() && where->
parent() ==
this);
1231 if (where == m_first_attribute)
1232 remove_first_attribute();
1233 else if (where == m_last_attribute)
1234 remove_last_attribute();
1246 attribute->m_parent = 0;
1247 m_first_attribute = 0;
1301 template <
class Ch =
char>
1318 template <
int Flags>
1323 this->remove_all_nodes();
1324 this->remove_all_attributes();
1327 parse_bom<Flags>(text);
1332 skip<whitespace_pred, Flags>(text);
1333 if (*text == 0)
break;
1336 if (*text == Ch(
'<')) {
1339 this->append_node(node);
1348 this->remove_all_nodes();
1349 this->remove_all_attributes();
1360 return internal::lookup_tables<
1361 0>::lookup_whitespace[
static_cast<unsigned char>(ch)];
1368 return internal::lookup_tables<
1369 0>::lookup_node_name[
static_cast<unsigned char>(ch)];
1376 return internal::lookup_tables<
1377 0>::lookup_attribute_name[
static_cast<unsigned char>(ch)];
1384 return internal::lookup_tables<0>::lookup_text[
static_cast<unsigned char>(
1392 return internal::lookup_tables<
1393 0>::lookup_text_pure_no_ws[
static_cast<unsigned char>(ch)];
1400 return internal::lookup_tables<
1401 0>::lookup_text_pure_with_ws[
static_cast<unsigned char>(ch)];
1409 if (Quote == Ch(
'\''))
1410 return internal::lookup_tables<
1411 0>::lookup_attribute_data_1[
static_cast<unsigned char>(ch)];
1412 if (Quote == Ch(
'\"'))
1413 return internal::lookup_tables<
1414 0>::lookup_attribute_data_2[static_cast<unsigned char>(ch)];
1423 if (Quote == Ch(
'\''))
1424 return internal::lookup_tables<
1425 0>::lookup_attribute_data_1_pure[
static_cast<unsigned char>(ch)];
1426 if (Quote == Ch(
'\"'))
1427 return internal::lookup_tables<
1428 0>::lookup_attribute_data_2_pure[static_cast<unsigned char>(ch)];
1434 template <
int Flags>
1436 if (Flags & parse_no_utf8) {
1440 text[0] =
static_cast<unsigned char>(code);
1446 text[0] =
static_cast<unsigned char>(code);
1448 }
else if (code < 0x800)
1450 text[1] =
static_cast<unsigned char>((code | 0x80) & 0xBF);
1452 text[0] =
static_cast<unsigned char>(code | 0xC0);
1454 }
else if (code < 0x10000)
1456 text[2] =
static_cast<unsigned char>((code | 0x80) & 0xBF);
1458 text[1] =
static_cast<unsigned char>((code | 0x80) & 0xBF);
1460 text[0] =
static_cast<unsigned char>(code | 0xE0);
1462 }
else if (code < 0x110000)
1464 text[3] =
static_cast<unsigned char>((code | 0x80) & 0xBF);
1466 text[2] =
static_cast<unsigned char>((code | 0x80) & 0xBF);
1468 text[1] =
static_cast<unsigned char>((code | 0x80) & 0xBF);
1470 text[0] =
static_cast<unsigned char>(code | 0xF0);
1480 template <
class StopPred,
int Flags>
1483 while (StopPred::test(*tmp)) ++tmp;
1492 template <
class StopPred,
class StopPredPure,
int Flags>
1496 if (Flags & parse_no_entity_translation &&
1497 !(Flags & parse_normalize_whitespace) &&
1498 !(Flags & parse_trim_whitespace)) {
1499 skip<StopPred, Flags>(text);
1504 skip<StopPredPure, Flags>(text);
1509 while (StopPred::test(*src)) {
1511 if (!(Flags & parse_no_entity_translation)) {
1513 if (src[0] == Ch(
'&')) {
1517 if (src[2] == Ch(
'm') && src[3] == Ch(
'p') && src[4] == Ch(
';')) {
1523 if (src[2] == Ch(
'p') && src[3] == Ch(
'o') && src[4] == Ch(
's') &&
1524 src[5] == Ch(
';')) {
1534 if (src[2] == Ch(
'u') && src[3] == Ch(
'o') && src[4] == Ch(
't') &&
1535 src[5] == Ch(
';')) {
1545 if (src[2] == Ch(
't') && src[3] == Ch(
';')) {
1555 if (src[2] == Ch(
't') && src[3] == Ch(
';')) {
1565 if (src[2] == Ch(
'x')) {
1566 unsigned long code = 0;
1569 unsigned char digit = internal::lookup_tables<
1570 0>::lookup_digits[
static_cast<unsigned char>(*src)];
1571 if (digit == 0xFF)
break;
1572 code = code * 16 + digit;
1575 insert_coded_character<Flags>(dest,
1578 unsigned long code = 0;
1581 unsigned char digit = internal::lookup_tables<
1582 0>::lookup_digits[
static_cast<unsigned char>(*src)];
1583 if (digit == 0xFF)
break;
1584 code = code * 10 + digit;
1587 insert_coded_character<Flags>(dest,
1590 if (*src == Ch(
';'))
1605 if (Flags & parse_normalize_whitespace) {
1607 if (whitespace_pred::test(*src)) {
1612 while (whitespace_pred::test(*src)) ++src;
1630 template <
int Flags>
1633 if (static_cast<unsigned char>(text[0]) == 0xEF &&
1634 static_cast<unsigned char>(text[1]) == 0xBB &&
1635 static_cast<unsigned char>(text[2]) == 0xBF) {
1641 template <
int Flags>
1644 if (!(Flags & parse_declaration_node)) {
1646 while (text[0] != Ch(
'?') || text[1] != Ch(
'>')) {
1658 skip<whitespace_pred, Flags>(text);
1661 parse_node_attributes<Flags>(text, declaration);
1664 if (text[0] != Ch(
'?') || text[1] != Ch(
'>'))
1672 template <
int Flags>
1675 if (!(Flags & parse_comment_nodes)) {
1677 while (text[0] != Ch(
'-') || text[1] != Ch(
'-') || text[2] != Ch(
'>')) {
1689 while (text[0] != Ch(
'-') || text[1] != Ch(
'-') || text[2] != Ch(
'>')) {
1696 comment->
value(value, text - value);
1699 if (!(Flags & parse_no_string_terminators)) *text = Ch(
'\0');
1706 template <
int Flags>
1712 while (*text != Ch(
'>')) {
1748 if (Flags & parse_doctype_node) {
1751 doctype->
value(value, text - value);
1754 if (!(Flags & parse_no_string_terminators)) *text = Ch(
'\0');
1765 template <
int Flags>
1768 if (Flags & parse_pi_nodes) {
1774 skip<node_name_pred, Flags>(text);
1776 pi->
name(name, text - name);
1779 skip<whitespace_pred, Flags>(text);
1785 while (text[0] != Ch(
'?') || text[1] != Ch(
'>')) {
1786 if (*text == Ch(
'\0'))
1793 pi->
value(value, text - value);
1796 if (!(Flags & parse_no_string_terminators)) {
1805 while (text[0] != Ch(
'?') || text[1] != Ch(
'>')) {
1806 if (*text == Ch(
'\0'))
1819 template <
int Flags>
1822 if (!(Flags & parse_trim_whitespace)) text = contents_start;
1825 Ch *
value = text, *end;
1826 if (Flags & parse_normalize_whitespace)
1835 if (Flags & parse_trim_whitespace) {
1836 if (Flags & parse_normalize_whitespace) {
1839 if (*(end - 1) == Ch(
' ')) --end;
1842 while (whitespace_pred::test(*(end - 1))) --end;
1848 if (!(Flags & parse_no_data_nodes)) {
1850 data->
value(value, end - value);
1855 if (!(Flags & parse_no_element_values))
1856 if (*node->
value() == Ch(
'\0')) node->
value(value, end - value);
1859 if (!(Flags & parse_no_string_terminators)) {
1871 template <
int Flags>
1874 if (Flags & parse_no_data_nodes) {
1876 while (text[0] != Ch(
']') || text[1] != Ch(
']') || text[2] != Ch(
'>')) {
1886 while (text[0] != Ch(
']') || text[1] != Ch(
']') || text[2] != Ch(
'>')) {
1893 cdata->
value(value, text - value);
1896 if (!(Flags & parse_no_string_terminators)) *text = Ch(
'\0');
1903 template <
int Flags>
1910 skip<node_name_pred, Flags>(text);
1912 element->
name(name, text - name);
1915 skip<whitespace_pred, Flags>(text);
1918 parse_node_attributes<Flags>(text, element);
1921 if (*text == Ch(
'>')) {
1923 parse_node_contents<Flags>(text, element);
1924 }
else if (*text == Ch(
'/')) {
1932 if (!(Flags & parse_no_string_terminators))
1940 template <
int Flags>
1947 return parse_element<Flags>(text);
1952 if ((text[0] == Ch(
'x') || text[0] == Ch(
'X')) &&
1953 (text[1] == Ch(
'm') || text[1] == Ch(
'M')) &&
1954 (text[2] == Ch(
'l') || text[2] == Ch(
'L')) &&
1955 whitespace_pred::test(text[3])) {
1958 return parse_xml_declaration<Flags>(text);
1961 return parse_pi<Flags>(text);
1971 if (text[2] == Ch(
'-')) {
1974 return parse_comment<Flags>(text);
1980 if (text[2] == Ch(
'C') && text[3] == Ch(
'D') &&
1981 text[4] == Ch(
'A') && text[5] == Ch(
'T') &&
1982 text[6] == Ch(
'A') && text[7] == Ch(
'[')) {
1985 return parse_cdata<Flags>(text);
1991 if (text[2] == Ch(
'O') && text[3] == Ch(
'C') &&
1992 text[4] == Ch(
'T') && text[5] == Ch(
'Y') &&
1993 text[6] == Ch(
'P') && text[7] == Ch(
'E') &&
1994 whitespace_pred::test(text[8])) {
1997 return parse_doctype<Flags>(text);
2004 while (*text != Ch(
'>')) {
2014 template <
int Flags>
2019 Ch *contents_start =
2021 skip<whitespace_pred, Flags>(text);
2022 Ch next_char = *text;
2031 switch (next_char) {
2034 if (text[1] == Ch(
'/')) {
2037 if (Flags & parse_validate_closing_tags) {
2039 Ch *closing_name = text;
2040 skip<node_name_pred, Flags>(text);
2042 closing_name, text - closing_name,
true))
2046 skip<node_name_pred, Flags>(text);
2049 skip<whitespace_pred, Flags>(text);
2067 next_char = parse_and_append_data<Flags>(node, text, contents_start);
2068 goto after_data_node;
2074 template <
int Flags>
2077 while (attribute_name_pred::test(*text)) {
2081 skip<attribute_name_pred, Flags>(text);
2086 attribute->
name(name, text - name);
2090 skip<whitespace_pred, Flags>(text);
2097 if (!(Flags & parse_no_string_terminators))
2101 skip<whitespace_pred, Flags>(text);
2105 if (quote != Ch(
'\'') && quote != Ch(
'"'))
2110 Ch *
value = text, *end;
2111 const int AttFlags =
2113 ~parse_normalize_whitespace;
2115 if (quote == Ch(
'\''))
2126 attribute->
value(value, end - value);
2133 if (!(Flags & parse_no_string_terminators))
2137 skip<whitespace_pred, Flags>(text);
2146 template <
int Dummy>
2147 const unsigned char lookup_tables<Dummy>::lookup_whitespace[256] = {
2149 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
2150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2151 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2152 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2154 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2156 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2157 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2159 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2160 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2163 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2168 template <
int Dummy>
2169 const unsigned char lookup_tables<Dummy>::lookup_node_name[256] = {
2171 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1,
2172 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2173 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2174 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
2175 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2176 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2177 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2178 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2179 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2180 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2181 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2182 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2184 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2185 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2186 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2190 template <
int Dummy>
2191 const unsigned char lookup_tables<Dummy>::lookup_text[256] = {
2193 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2194 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
2297 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2298 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2303 template <
int Dummy>
2304 const unsigned char lookup_tables<Dummy>::lookup_attribute_data_1_pure[256] = {
2306 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2307 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2308 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
2309 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2310 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2311 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2312 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2313 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2321 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2325 template <
int Dummy>
2326 const unsigned char lookup_tables<Dummy>::lookup_attribute_data_2[256] = {
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354 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2355 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2359 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2364 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2365 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
2370 template <
int Dummy>
2371 const unsigned char lookup_tables<Dummy>::lookup_digits[256] = {
2373 255, 255, 255, 255, 255, 255, 255, 255,
2374 255, 255, 255, 255, 255, 255, 255, 255,
2375 255, 255, 255, 255, 255, 255, 255, 255,
2376 255, 255, 255, 255, 255, 255, 255, 255,
2377 255, 255, 255, 255, 255, 255, 255, 255,
2378 255, 255, 255, 255, 255, 255, 255, 255,
2379 0, 1, 2, 3, 4, 5, 6, 7,
2380 8, 9, 255, 255, 255, 255, 255, 255,
2381 255, 10, 11, 12, 13, 14, 15, 255,
2382 255, 255, 255, 255, 255, 255, 255, 255,
2383 255, 255, 255, 255, 255, 255, 255, 255,
2384 255, 255, 255, 255, 255, 255, 255, 255,
2385 255, 10, 11, 12, 13, 14, 15, 255,
2386 255, 255, 255, 255, 255, 255, 255, 255,
2387 255, 255, 255, 255, 255, 255, 255, 255,
2388 255, 255, 255, 255, 255, 255, 255, 255,
2389 255, 255, 255, 255, 255, 255, 255, 255,
2390 255, 255, 255, 255, 255, 255, 255, 255,
2391 255, 255, 255, 255, 255, 255, 255, 255,
2392 255, 255, 255, 255, 255, 255, 255, 255,
2393 255, 255, 255, 255, 255, 255, 255, 255,
2394 255, 255, 255, 255, 255, 255, 255, 255,
2395 255, 255, 255, 255, 255, 255, 255, 255,
2396 255, 255, 255, 255, 255, 255, 255, 255,
2397 255, 255, 255, 255, 255, 255, 255, 255,
2398 255, 255, 255, 255, 255, 255, 255, 255,
2399 255, 255, 255, 255, 255, 255, 255, 255,
2400 255, 255, 255, 255, 255, 255, 255, 255,
2401 255, 255, 255, 255, 255, 255, 255, 255,
2402 255, 255, 255, 255, 255, 255, 255, 255,
2403 255, 255, 255, 255, 255, 255, 255, 255,
2404 255, 255, 255, 255, 255, 255, 255, 255
2408 template <
int Dummy>
2409 const unsigned char lookup_tables<Dummy>::lookup_upcase[256] = {
2411 0, 1, 2, 3, 4, 5, 6, 7,
2412 8, 9, 10, 11, 12, 13, 14, 15,
2413 16, 17, 18, 19, 20, 21, 22, 23,
2414 24, 25, 26, 27, 28, 29, 30, 31,
2415 32, 33, 34, 35, 36, 37, 38, 39,
2416 40, 41, 42, 43, 44, 45, 46, 47,
2417 48, 49, 50, 51, 52, 53, 54, 55,
2418 56, 57, 58, 59, 60, 61, 62, 63,
2419 64, 65, 66, 67, 68, 69, 70, 71,
2420 72, 73, 74, 75, 76, 77, 78, 79,
2421 80, 81, 82, 83, 84, 85, 86, 87,
2422 88, 89, 90, 91, 92, 93, 94, 95,
2423 96, 65, 66, 67, 68, 69, 70, 71,
2424 72, 73, 74, 75, 76, 77, 78, 79,
2425 80, 81, 82, 83, 84, 85, 86, 87,
2426 88, 89, 90, 123, 124, 125, 126, 127,
2427 128, 129, 130, 131, 132, 133, 134, 135,
2428 136, 137, 138, 139, 140, 141, 142, 143,
2429 144, 145, 146, 147, 148, 149, 150, 151,
2430 152, 153, 154, 155, 156, 157, 158, 159,
2431 160, 161, 162, 163, 164, 165, 166, 167,
2432 168, 169, 170, 171, 172, 173, 174, 175,
2433 176, 177, 178, 179, 180, 181, 182, 183,
2434 184, 185, 186, 187, 188, 189, 190, 191,
2435 192, 193, 194, 195, 196, 197, 198, 199,
2436 200, 201, 202, 203, 204, 205, 206, 207,
2437 208, 209, 210, 211, 212, 213, 214, 215,
2438 216, 217, 218, 219, 220, 221, 222, 223,
2439 224, 225, 226, 227, 228, 229, 230, 231,
2440 232, 233, 234, 235, 236, 237, 238, 239,
2441 240, 241, 242, 243, 244, 245, 246, 247,
2442 248, 249, 250, 251, 252, 253, 254, 255
2450 #undef RAPIDXML_PARSE_ERROR 2454 #pragma warning(pop) #define RAPIDXML_DYNAMIC_POOL_SIZE
xml_node< Ch > * clone_node(const xml_node< Ch > *source, xml_node< Ch > *result=0)
const CharType(& source)[N]
xml_node< Ch > * previous_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
static unsigned char test(Ch ch)
void name(const Ch *name, std::size_t size)
#define RAPIDXML_ALIGNMENT
xml_node< Ch > * m_next_sibling
#define RAPIDXML_PARSE_ERROR(what, where)
void prepend_attribute(xml_attribute< Ch > *attribute)
const int parse_no_element_values
const int parse_no_entity_translation
xml_node< Ch > * parse_pi(Ch *&text)
void value(const Ch *value, std::size_t size)
const int parse_no_data_nodes
static unsigned char test(Ch ch)
std::size_t name_size() const
void parse_node_contents(Ch *&text, xml_node< Ch > *node)
Ch * allocate_string(const Ch *source=0, std::size_t size=0)
static Ch * skip_and_expand_character_refs(Ch *&text)
xml_attribute< Ch > * next_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
xml_document< Ch > * document() const
A CDATA node. Name is empty. Value contains data text.
void parse_bom(Ch *&text)
void set_allocator(alloc_func *af, free_func *ff)
xml_document()
Constructs empty XML document.
#define RAPIDXML_STATIC_POOL_SIZE
const int parse_validate_closing_tags
void append_attribute(xml_attribute< Ch > *attribute)
xml_node< Ch > * parse_doctype(Ch *&text)
A document node. Name and value are empty.
xml_node< Ch > * last_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
xml_node< Ch > * m_last_node
memory_pool()
Constructs empty pool with default allocator functions.
static unsigned char test(Ch ch)
void parse_node_attributes(Ch *&text, xml_node< Ch > *node)
static unsigned char test(Ch ch)
xml_node< Ch > * parent() const
void remove_all_nodes()
Removes all child nodes (but not attributes).
xml_node< Ch > * first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
void remove_last_attribute()
void remove_first_attribute()
static unsigned char test(Ch ch)
char * allocate_raw(std::size_t size)
void insert_node(xml_node< Ch > *where, xml_node< Ch > *child)
void remove_attribute(xml_attribute< Ch > *where)
xml_attribute< Ch > * previous_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
xml_node< Ch > * parse_xml_declaration(Ch *&text)
const int parse_comment_nodes
static void skip(Ch *&text)
Ch parse_and_append_data(xml_node< Ch > *node, Ch *&text, Ch *contents_start)
static unsigned char test(Ch ch)
void name(const Ch *name)
const int parse_non_destructive
xml_node< Ch > * parse_element(Ch *&text)
const int parse_declaration_node
virtual const char * what() const
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
void remove_node(xml_node< Ch > *where)
Removes specified child from the node.
const int parse_trim_whitespace
static unsigned char test(Ch ch)
A data node. Name is empty. Value contains data text.
xml_node< Ch > * parse_node(Ch *&text)
xml_node< Ch > * m_parent
A PI node. Name contains target. Value contains instructions.
xml_attribute< Ch > * last_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
xml_node< Ch > * next_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
void append_node(xml_node< Ch > *child)
xml_attribute< Ch > * m_last_attribute
const GenericPointer< typename T::ValueType > T2 value
const int parse_normalize_whitespace
xml_node< Ch > * allocate_node(node_type type, const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0)
void type(node_type type)
const int parse_no_string_terminators
xml_node< Ch > * parse_comment(Ch *&text)
void * allocate_aligned(std::size_t size)
xml_node< Ch > * parse_cdata(Ch *&text)
xml_attribute< Ch > * m_first_attribute
static void insert_coded_character(Ch *&text, unsigned long code)
xml_node< Ch > * m_prev_sibling
xml_node< Ch > * m_first_node
xml_document< Ch > * document() const
void prepend_node(xml_node< Ch > *child)
static unsigned char test(Ch ch)
void insert_attribute(xml_attribute< Ch > *where, xml_attribute< Ch > *attribute)
xml_attribute< Ch > * m_prev_attribute
alloc_func * m_alloc_func
parse_error(const char *what, void *where)
Constructs parse error.
void remove_all_attributes()
Removes all attributes of node.
xml_attribute< Ch > * allocate_attribute(const Ch *name=0, const Ch *value=0, std::size_t name_size=0, std::size_t value_size=0)
xml_attribute< Ch > * m_next_attribute
std::size_t value_size() const
void value(const Ch *value)
const int parse_doctype_node