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

Function acl_xml2_update

lib_acl/src/xml/acl_xml2_parse.c:1058–1101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1056};
1057
1058const char *acl_xml2_update(ACL_XML2 *xml, const char *data)
1059{
1060 const char *myname = "acl_xml2_update";
1061
1062 if (data == NULL)
1063 return "";
1064 else if (*data == 0)
1065 return data;
1066
1067 if (!(xml->flag & ACL_XML2_FLAG_MULTI_ROOT) && xml->root_cnt > 0)
1068 return data;
1069
1070 /* XML ������״̬��ѭ���������� */
1071
1072 while (*data) {
1073 if (xml->curr_node == NULL) {
1074 if (!(xml->flag & ACL_XML2_FLAG_MULTI_ROOT)
1075 && xml->root_cnt > 0)
1076 {
1077 break;
1078 }
1079
1080 SKIP_SPACE(data);
1081 if (*data == 0)
1082 break;
1083
1084 xml->curr_node = acl_xml2_node_alloc(xml);
1085 acl_xml2_node_add_child(xml->root, xml->curr_node);
1086 xml->curr_node->depth = xml->root->depth + 1;
1087 if (xml->curr_node->depth > xml->depth)
1088 xml->depth = xml->curr_node->depth;
1089 }
1090
1091 data = status_tab[xml->curr_node->status].callback(xml, data);
1092
1093 if (NO_SPACE(xml)) {
1094 acl_msg_warn("%s(%d), %s: space not enougth!",
1095 __FILE__, __LINE__, myname);
1096 break;
1097 }
1098 }
1099
1100 return data;
1101}

Callers 4

parse_xml_fileFunction · 0.85
test1Function · 0.85
parse_xml_fileFunction · 0.85
updateMethod · 0.85

Calls 3

acl_xml2_node_allocFunction · 0.85
acl_xml2_node_add_childFunction · 0.85
acl_msg_warnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…