MCPcopy Create free account
hub / github.com/acl-dev/acl / get_xml

Function get_xml

lib_acl/samples/xml/xml6/xml.c:424–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424static 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
462static void parse_xml(const char *data, const char* root, int multi_root)
463{

Callers 1

parse_xmlFunction · 0.70

Calls 5

acl_xml3_allocFunction · 0.85
acl_xml3_multi_rootFunction · 0.85
acl_xml3_slashFunction · 0.85
acl_xml3_updateFunction · 0.85
acl_xml3_is_completeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…