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

Function xmlSAX2EndDocument

ThirdParty/libxml2/vtklibxml2/SAX2.c:863–886  ·  view source on GitHub ↗

* xmlSAX2EndDocument: * @ctx: the user data (XML parser context) * * called when the document end has been detected. */

Source from the content-addressed store, hash-verified

861 * called when the document end has been detected.
862 */
863void
864xmlSAX2EndDocument(void *ctx)
865{
866 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
867 xmlDocPtr doc;
868
869 if (ctx == NULL) return;
870#ifdef LIBXML_VALID_ENABLED
871 if (ctxt->validate && ctxt->wellFormed &&
872 ctxt->myDoc && ctxt->myDoc->intSubset)
873 ctxt->valid &= xmlValidateDocumentFinal(&ctxt->vctxt, ctxt->myDoc);
874#endif /* LIBXML_VALID_ENABLED */
875
876 doc = ctxt->myDoc;
877 if ((doc != NULL) && (doc->encoding == NULL)) {
878 const xmlChar *encoding = xmlGetActualEncoding(ctxt);
879
880 if (encoding != NULL) {
881 doc->encoding = xmlStrdup(encoding);
882 if (doc->encoding == NULL)
883 xmlSAX2ErrMemory(ctxt);
884 }
885 }
886}
887
888static void
889xmlSAX2AppendChild(xmlParserCtxtPtr ctxt, xmlNodePtr node) {

Callers 1

endDocumentFunction · 0.85

Calls 4

xmlValidateDocumentFinalFunction · 0.85
xmlGetActualEncodingFunction · 0.85
xmlStrdupFunction · 0.85
xmlSAX2ErrMemoryFunction · 0.85

Tested by

no test coverage detected