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

Function htmlSAXParseDoc

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:5845–5868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5843 */
5844
5845htmlDocPtr
5846htmlSAXParseDoc(const xmlChar *cur, const char *encoding,
5847 htmlSAXHandlerPtr sax, void *userData) {
5848 htmlDocPtr ret;
5849 htmlParserCtxtPtr ctxt;
5850
5851 if (cur == NULL)
5852 return(NULL);
5853
5854 ctxt = htmlCreateDocParserCtxt(cur, NULL, encoding);
5855 if (ctxt == NULL)
5856 return(NULL);
5857
5858 if (sax != NULL) {
5859 *ctxt->sax = *sax;
5860 ctxt->userData = userData;
5861 }
5862
5863 htmlParseDocument(ctxt);
5864 ret = ctxt->myDoc;
5865 htmlFreeParserCtxt(ctxt);
5866
5867 return(ret);
5868}
5869
5870/**
5871 * htmlParseDoc:

Callers 1

htmlParseDocFunction · 0.85

Calls 3

htmlCreateDocParserCtxtFunction · 0.85
htmlParseDocumentFunction · 0.85
htmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected