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

Function xmlFinishDocument

ThirdParty/libxml2/vtklibxml2/parser.c:10537–10568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10535}
10536
10537static void
10538xmlFinishDocument(xmlParserCtxtPtr ctxt) {
10539 xmlDocPtr doc;
10540
10541 /*
10542 * SAX: end of the document processing.
10543 */
10544 if ((ctxt->sax) && (ctxt->sax->endDocument != NULL))
10545 ctxt->sax->endDocument(ctxt->userData);
10546
10547 doc = ctxt->myDoc;
10548 if (doc != NULL) {
10549 if (ctxt->wellFormed) {
10550 doc->properties |= XML_DOC_WELLFORMED;
10551 if (ctxt->valid)
10552 doc->properties |= XML_DOC_DTDVALID;
10553 if (ctxt->nsWellFormed)
10554 doc->properties |= XML_DOC_NSVALID;
10555 }
10556
10557 if (ctxt->options & XML_PARSE_OLD10)
10558 doc->properties |= XML_DOC_OLD10;
10559
10560 /*
10561 * Remove locally kept entity definitions if the tree was not built
10562 */
10563 if (xmlStrEqual(doc->version, SAX_COMPAT_MODE)) {
10564 xmlFreeDoc(doc);
10565 ctxt->myDoc = NULL;
10566 }
10567 }
10568}
10569
10570/**
10571 * xmlParseDocument:

Callers 3

xmlParseDocumentFunction · 0.85
parser.cFile · 0.85
xmlParseChunkFunction · 0.85

Calls 2

xmlStrEqualFunction · 0.85
xmlFreeDocFunction · 0.85

Tested by

no test coverage detected