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

Function htmlNewSAXParserCtxt

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:5003–5019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5001 */
5002
5003htmlParserCtxtPtr
5004htmlNewSAXParserCtxt(const htmlSAXHandler *sax, void *userData)
5005{
5006 xmlParserCtxtPtr ctxt;
5007
5008 xmlInitParser();
5009
5010 ctxt = (xmlParserCtxtPtr) xmlMalloc(sizeof(xmlParserCtxt));
5011 if (ctxt == NULL)
5012 return(NULL);
5013 memset(ctxt, 0, sizeof(xmlParserCtxt));
5014 if (htmlInitParserCtxt(ctxt, sax, userData) < 0) {
5015 htmlFreeParserCtxt(ctxt);
5016 return(NULL);
5017 }
5018 return(ctxt);
5019}
5020
5021static htmlParserCtxtPtr
5022htmlCreateMemoryParserCtxtInternal(const char *url,

Callers 3

htmlNewParserCtxtFunction · 0.85
htmlCreatePushParserCtxtFunction · 0.85
saxParseTestFunction · 0.85

Calls 3

xmlInitParserFunction · 0.85
htmlInitParserCtxtFunction · 0.85
htmlFreeParserCtxtFunction · 0.85

Tested by 1

saxParseTestFunction · 0.68