MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlconfTestNotWF

Function xmlconfTestNotWF

ThirdParty/libxml2/vtklibxml2/runxmlconf.c:272–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272static int
273xmlconfTestNotWF(const char *id, const char *filename, int options) {
274 xmlParserCtxtPtr ctxt;
275 xmlDocPtr doc;
276 int ret = 1;
277
278 ctxt = xmlNewParserCtxt();
279 xmlCtxtSetErrorHandler(ctxt, testErrorHandler, NULL);
280 doc = xmlCtxtReadFile(ctxt, filename, NULL, options);
281 if (doc != NULL) {
282 test_log("test %s : %s failed to detect not well formedness\n",
283 id, filename);
284 nb_errors++;
285 xmlFreeDoc(doc);
286 ret = 0;
287 }
288 xmlFreeParserCtxt(ctxt);
289 return(ret);
290}
291
292static int
293xmlconfTestItem(xmlDocPtr doc, xmlNodePtr cur) {

Callers 1

xmlconfTestItemFunction · 0.85

Calls 6

xmlNewParserCtxtFunction · 0.85
xmlCtxtSetErrorHandlerFunction · 0.85
xmlCtxtReadFileFunction · 0.85
xmlFreeDocFunction · 0.85
xmlFreeParserCtxtFunction · 0.85
test_logFunction · 0.70

Tested by

no test coverage detected