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

Function htmlReadFile

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:6404–6423  ·  view source on GitHub ↗

* htmlReadFile: * @filename: a file or URL * @encoding: the document encoding (optional) * @options: a combination of htmlParserOptions * * Convenience function to parse an HTML file from the filesystem, * the network or a global user-defined resource loader. * * See htmlCtxtReadFile for details. * * Returns the resulting document tree. */

Source from the content-addressed store, hash-verified

6402 * Returns the resulting document tree.
6403 */
6404htmlDocPtr
6405htmlReadFile(const char *filename, const char *encoding, int options)
6406{
6407 htmlParserCtxtPtr ctxt;
6408 xmlParserInputPtr input;
6409 htmlDocPtr doc;
6410
6411 ctxt = htmlNewParserCtxt();
6412 if (ctxt == NULL)
6413 return(NULL);
6414
6415 htmlCtxtUseOptions(ctxt, options);
6416
6417 input = xmlNewInputURL(ctxt, filename, NULL, encoding, 0);
6418
6419 doc = htmlCtxtParseDocument(ctxt, input);
6420
6421 htmlFreeParserCtxt(ctxt);
6422 return(doc);
6423}
6424
6425/**
6426 * htmlReadMemory:

Callers 1

parseFileFunction · 0.85

Calls 5

htmlNewParserCtxtFunction · 0.85
htmlCtxtUseOptionsFunction · 0.85
xmlNewInputURLFunction · 0.85
htmlCtxtParseDocumentFunction · 0.85
htmlFreeParserCtxtFunction · 0.85

Tested by

no test coverage detected