| 476 | } |
| 477 | |
| 478 | int 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…