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

Function parseAndPrintFile

ThirdParty/libxml2/vtklibxml2/xmllint.c:2361–2880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2359}
2360
2361static void
2362parseAndPrintFile(const char *filename, xmlParserCtxtPtr rectxt) {
2363 xmlDocPtr doc;
2364
2365 if ((timing) && (!repeat))
2366 startTimer();
2367
2368 doc = parseFile(filename, rectxt);
2369 if (doc == NULL) {
2370 if (progresult == XMLLINT_RETURN_OK)
2371 progresult = XMLLINT_ERR_UNCLASS;
2372 return;
2373 }
2374
2375 if ((timing) && (!repeat)) {
2376 endTimer("Parsing");
2377 }
2378
2379 if (dropdtd) {
2380 xmlDtdPtr dtd;
2381
2382 dtd = xmlGetIntSubset(doc);
2383 if (dtd != NULL) {
2384 xmlUnlinkNode((xmlNodePtr)dtd);
2385 doc->intSubset = dtd;
2386 }
2387 }
2388
2389#ifdef LIBXML_XINCLUDE_ENABLED
2390 if (xinclude) {
2391 if ((timing) && (!repeat)) {
2392 startTimer();
2393 }
2394 if (xmlXIncludeProcessFlags(doc, options) < 0)
2395 progresult = XMLLINT_ERR_UNCLASS;
2396 if ((timing) && (!repeat)) {
2397 endTimer("Xinclude processing");
2398 }
2399 }
2400#endif
2401
2402#ifdef LIBXML_XPATH_ENABLED
2403 if (xpathquery != NULL) {
2404 doXPathQuery(doc, xpathquery);
2405 }
2406#endif
2407
2408#ifdef LIBXML_DEBUG_ENABLED
2409#ifdef LIBXML_XPATH_ENABLED
2410 /*
2411 * shell interaction
2412 */
2413 if (shell) {
2414 xmlXPathOrderDocElems(doc);
2415 xmlShell(doc, filename, xmlShellReadline, stdout);
2416 }
2417#endif
2418#endif

Callers 1

xmllint.cFile · 0.85

Calls 15

startTimerFunction · 0.85
parseFileFunction · 0.85
endTimerFunction · 0.85
xmlGetIntSubsetFunction · 0.85
xmlUnlinkNodeFunction · 0.85
xmlXIncludeProcessFlagsFunction · 0.85
doXPathQueryFunction · 0.85
xmlXPathOrderDocElemsFunction · 0.85
xmlShellFunction · 0.85
xmlCopyDocFunction · 0.85
xmlFreeDocFunction · 0.85
xmlValidGetValidElementsFunction · 0.85

Tested by

no test coverage detected