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

Function test_parse

lib_acl_cpp/samples/xml/xml4/main.cpp:73–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73static void test_parse(const char* filepath)
74{
75 acl::string buf;
76 if (acl::ifstream::load(filepath, &buf) == false)
77 {
78 printf("load %s error %s\r\n", filepath, acl::last_serror());
79 return;
80 }
81
82 acl::xml1 xml;
83 xml.update(buf);
84 //printf("------------- buf data print ----------------------\r\n");
85 //printf("[%s]\r\n", buf.c_str());
86 //printf("------------- xml data print-----------------------\r\n");
87 //printf("[%s]\r\n", xml.to_string());
88 printf("------------- xml node walk -----------------------\r\n");
89 xml_node_walk(xml.get_root(), 0);
90
91 printf("------------- build xml ---------------------------\r\n");
92 printf("%s\r\n", xml.to_string());
93 printf("------------- build xml end -----------------------\r\n");
94}
95
96static void test_parse_mmap(const char* filepath)
97{

Callers 1

mainFunction · 0.70

Calls 4

xml_node_walkFunction · 0.70
last_serrorFunction · 0.50
updateMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…