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

Function htmlSAXParseFile

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:5948–5973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5946 */
5947
5948htmlDocPtr
5949htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax,
5950 void *userData) {
5951 htmlDocPtr ret;
5952 htmlParserCtxtPtr ctxt;
5953 htmlSAXHandlerPtr oldsax = NULL;
5954
5955 ctxt = htmlCreateFileParserCtxt(filename, encoding);
5956 if (ctxt == NULL) return(NULL);
5957 if (sax != NULL) {
5958 oldsax = ctxt->sax;
5959 ctxt->sax = sax;
5960 ctxt->userData = userData;
5961 }
5962
5963 htmlParseDocument(ctxt);
5964
5965 ret = ctxt->myDoc;
5966 if (sax != NULL) {
5967 ctxt->sax = oldsax;
5968 ctxt->userData = NULL;
5969 }
5970 htmlFreeParserCtxt(ctxt);
5971
5972 return(ret);
5973}
5974
5975/**
5976 * htmlParseFile:

Callers 1

htmlParseFileFunction · 0.85

Calls 3

htmlCreateFileParserCtxtFunction · 0.85
htmlParseDocumentFunction · 0.85
htmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected