| 422 | } |
| 423 | |
| 424 | static ACL_XML3 *get_xml(char *data, const char* root, int multi_root) |
| 425 | { |
| 426 | ACL_XML3 *xml; |
| 427 | const char *left; |
| 428 | |
| 429 | printf("--------------------- xml data ------------------------\r\n"); |
| 430 | printf("{%s}\r\n", data); |
| 431 | printf("--------------------- xml data end --------------------\r\n"); |
| 432 | printf("Enter any key to continue ...\r\n"); |
| 433 | getchar(); |
| 434 | |
| 435 | xml = acl_xml3_alloc(); |
| 436 | acl_xml3_multi_root(xml, multi_root); |
| 437 | acl_xml3_slash(xml, 1); |
| 438 | |
| 439 | /* һ���Եط������� xml ���� */ |
| 440 | ACL_METER_TIME("-------------parse begin--------------"); |
| 441 | left = acl_xml3_update(xml, data); |
| 442 | |
| 443 | ACL_METER_TIME("-------------parse end----------------"); |
| 444 | printf("---------------- left data ----------------------------\r\n"); |
| 445 | printf("{%s}\r\n", left ? left : "empty"); |
| 446 | printf("---------------- left data end ------------------------\r\n"); |
| 447 | |
| 448 | printf("Enter any key to continue ...\r\n"); |
| 449 | getchar(); |
| 450 | |
| 451 | if (acl_xml3_is_complete(xml, root)) |
| 452 | printf(">> Yes, the xml complete\n"); |
| 453 | else |
| 454 | printf(">> No, the xml not complete, root tag: %s\n", root); |
| 455 | |
| 456 | printf("Enter any key to continue ...\r\n"); |
| 457 | getchar(); |
| 458 | |
| 459 | return xml; |
| 460 | } |
| 461 | |
| 462 | static void parse_xml(const char *data, const char* root, int multi_root) |
| 463 | { |
no test coverage detected
searching dependent graphs…