Changeset 5206 for pjproject/trunk
- Timestamp:
- Dec 3, 2015 11:43:58 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/xml.c
r4537 r5206 131 131 132 132 /* Sub nodes. */ 133 while (*scanner->curptr == '<' && *(scanner->curptr+1) != '/') { 133 while (*scanner->curptr == '<' && *(scanner->curptr+1) != '/' 134 && *(scanner->curptr+1) != '!') 135 { 134 136 pj_xml_node *sub_node = xml_parse_node(pool, scanner); 135 137 pj_list_push_back( &node->node_head, sub_node ); … … 139 141 if (!pj_scan_is_eof(scanner) && *scanner->curptr != '<') { 140 142 pj_scan_get_until_ch(scanner, '<', &node->content); 143 } 144 145 /* CDATA content. */ 146 if (*scanner->curptr == '<' && *(scanner->curptr+1) == '!' && 147 pj_scan_strcmp(scanner, "<![CDATA[", 9) == 0) 148 { 149 pj_scan_advance_n(scanner, 9, PJ_FALSE); 150 pj_scan_get_until_ch(scanner, ']', &node->content); 151 while (pj_scan_strcmp(scanner, "]]>", 3)) { 152 pj_str_t dummy; 153 pj_scan_get_until_ch(scanner, ']', &dummy); 154 } 155 node->content.slen = scanner->curptr - node->content.ptr; 156 pj_scan_advance_n(scanner, 3, PJ_TRUE); 141 157 } 142 158
Note: See TracChangeset
for help on using the changeset viewer.