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

Function acl_xml_node_delete

lib_acl/src/xml/acl_xml.c:136–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136int acl_xml_node_delete(ACL_XML_NODE *node)
137{
138 ACL_RING *next;
139 ACL_XML_NODE *node_next;
140 int n = 1;
141
142 while ((next = acl_ring_pop_head(&node->children)) != NULL) {
143 node_next = acl_ring_to_appl(next, ACL_XML_NODE, node);
144 n += acl_xml_node_delete(node_next);
145 }
146
147 if (node->id != NULL)
148 acl_htable_delete(node->xml->id_table, STR(node->id), NULL);
149
150 if (node->attr_list != NULL) {
151 int k = acl_array_size(node->attr_list);
152 if (node->xml->attr_cnt >= k)
153 node->xml->attr_cnt -= k;
154 }
155
156 acl_ring_detach(&node->node);
157 node->xml->node_cnt--;
158
159 return n;
160}
161
162void acl_xml_node_append(ACL_XML_NODE *node1, ACL_XML_NODE *node2)
163{

Callers 3

parse_xmlFunction · 0.85
parse_xmlFunction · 0.85
detachMethod · 0.85

Calls 4

acl_ring_pop_headFunction · 0.85
acl_htable_deleteFunction · 0.85
acl_array_sizeFunction · 0.85
acl_ring_detachFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…