MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / xml_value

Function xml_value

sql/item_xmlfunc.cc:2685–2696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2683extern "C" int xml_value(MY_XML_PARSER *st,const char *attr, size_t len);
2684
2685int xml_value(MY_XML_PARSER *st,const char *attr, size_t len)
2686{
2687 MY_XML_USER_DATA *data= (MY_XML_USER_DATA*)st->user_data;
2688 MY_XML_NODE node;
2689
2690 node.parent= data->parent; // Set parent for the new text node to old parent
2691 node.level= data->level;
2692 node.type= MY_XML_NODE_TEXT;
2693 node.beg= attr;
2694 node.end= attr + len;
2695 return append_node(data->pxml, &node) ? MY_XML_ERROR : MY_XML_OK;
2696}
2697
2698
2699/*

Callers

nothing calls this directly

Calls 1

append_nodeFunction · 0.85

Tested by

no test coverage detected