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

Function xml_parse_right_lt

lib_acl/src/xml/acl_xml_parse.c:659–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659static const char *xml_parse_right_lt(ACL_XML *xml, const char *data)
660{
661 ACL_XML_NODE *node;
662
663 SKIP_SPACE(data);
664 if (*data == 0)
665 return data;
666
667 if (*data == '/') {
668 data++;
669 xml->curr_node->status = ACL_XML_S_RTAG;
670
671 return data;
672 } else if ((xml->curr_node->flag & ACL_XML_F_LEAF)) {
673 ADDCH(xml->curr_node->text, '<');
674 ADDCH(xml->curr_node->text, *data);
675 ACL_VSTRING_TERMINATE(xml->curr_node->text);
676 xml->curr_node->status = ACL_XML_S_TXT;
677 data++;
678
679 return data;
680 }
681
682 /* ˵�������˵�ǰ�ڵ���ӽڵ� */
683
684 /* �������õ�ǰ�ڵ�״̬���Ա����䱻�ӽڵ㵯��ʱ�����ҵ� "</" */
685 xml->curr_node->status = ACL_XML_S_TXT;
686
687 /* �����µ��ӽڵ㣬�������������ǰ�ڵ���ӽڵ㼯���� */
688
689 node = acl_xml_node_alloc(xml);
690 acl_xml_node_add_child(xml->curr_node, node);
691 node->depth = xml->curr_node->depth + 1;
692 if (node->depth > xml->depth)
693 xml->depth = node->depth;
694 xml->curr_node = node;
695 xml->curr_node->status = ACL_XML_S_LLT;
696
697 return data;
698}
699
700/* ��Ϊ�ø��ڵ���ʵΪҶ�ڵ㣬������Ҫ���¸����ڸ�α���ڵ��
701 * �ӽڵ�����ֵ����Ӧ���α���ڵ���ͬ

Callers

nothing calls this directly

Calls 2

acl_xml_node_allocFunction · 0.85
acl_xml_node_add_childFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…