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

Function acl_xml3_is_complete

lib_acl/src/xml/acl_xml3.c:478–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478int acl_xml3_is_complete(ACL_XML3 *xml, const char *tag)
479{
480 ACL_XML3_NODE *last_node = NULL;
481 ACL_ITER iter;
482
483 if (!(xml->flag & ACL_XML3_FLAG_MULTI_ROOT) && xml->root_cnt > 0)
484 return 1;
485
486 acl_foreach_reverse(iter, xml->root) {
487 ACL_XML3_NODE *node = (ACL_XML3_NODE*) iter.data;
488 if (!(node->flag & ACL_XML3_F_META)) {
489 last_node = node;
490 break;
491 }
492 }
493
494 if (last_node == NULL)
495 /* ˵��û����ʵ�ӽڵ� */
496 return 0;
497
498 if ((last_node->flag & ACL_XML3_F_SELF_CL))
499 /* ˵���ýڵ����ԱպϽڵ� */
500 return 1;
501
502 if (last_node->status != ACL_XML3_S_RGT)
503 /* ˵�����һ��һ���ӽڵ㻹δ������� */
504 return 0;
505
506 if (strcasecmp(last_node->rtag, tag) == 0)
507 return 1;
508
509 /* ˵�� xml �е����һ���ڵ���������ǩ��ƥ�� */
510 return 0;
511}

Callers 2

parse_xml_fileFunction · 0.85
get_xmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…