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

Function xml_parse_text

lib_acl/src/xml/acl_xml_parse.c:622–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622static const char *xml_parse_text(ACL_XML *xml, const char *data)
623{
624 int ch;
625
626 if (LEN(xml->curr_node->text) == 0)
627 SKIP_SPACE(data);
628
629 if (*data == 0)
630 return data;
631
632 while ((ch = *data) != 0) {
633 data++;
634
635 if (ch == '<') {
636 xml->curr_node->status = ACL_XML_S_RLT;
637 break;
638 }
639
640 ADDCH(xml->curr_node->text, ch);
641 }
642
643 ACL_VSTRING_TERMINATE(xml->curr_node->text);
644
645 if (xml->curr_node->status != ACL_XML_S_RLT)
646 return data;
647
648 if (LEN(xml->curr_node->text) == 0 || xml->decode_buf == NULL)
649 return data;
650
651 ACL_VSTRING_RESET(xml->decode_buf);
652 acl_xml_decode(STR(xml->curr_node->text), xml->decode_buf);
653 if (LEN(xml->decode_buf) > 0)
654 STRCPY(xml->curr_node->text, STR(xml->decode_buf));
655
656 return data;
657}
658
659static const char *xml_parse_right_lt(ACL_XML *xml, const char *data)
660{

Callers

nothing calls this directly

Calls 1

acl_xml_decodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…