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

Function htmlReadIO

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:6520–6540  ·  view source on GitHub ↗

* htmlReadIO: * @ioread: an I/O read function * @ioclose: an I/O close function (optional) * @ioctx: an I/O handler * @url: only used for error reporting (optional) * @encoding: the document encoding (optional) * @options: a combination of htmlParserOption(s) * * Convenience function to parse an HTML document from I/O functions * and context. * * See htmlCtxtReadIO for details. *

Source from the content-addressed store, hash-verified

6518 * Returns the resulting document tree
6519 */
6520htmlDocPtr
6521htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
6522 void *ioctx, const char *url, const char *encoding, int options)
6523{
6524 htmlParserCtxtPtr ctxt;
6525 xmlParserInputPtr input;
6526 htmlDocPtr doc;
6527
6528 ctxt = htmlNewParserCtxt();
6529 if (ctxt == NULL)
6530 return (NULL);
6531
6532 htmlCtxtUseOptions(ctxt, options);
6533
6534 input = xmlNewInputIO(ctxt, url, ioread, ioclose, ioctx, encoding, 0);
6535
6536 doc = htmlCtxtParseDocument(ctxt, input);
6537
6538 htmlFreeParserCtxt(ctxt);
6539 return(doc);
6540}
6541
6542/**
6543 * htmlCtxtReadDoc:

Callers

nothing calls this directly

Calls 5

htmlNewParserCtxtFunction · 0.85
htmlCtxtUseOptionsFunction · 0.85
xmlNewInputIOFunction · 0.85
htmlCtxtParseDocumentFunction · 0.85
htmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected