MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / htmlCtxtReadFile

Function htmlCtxtReadFile

Externals/LibXML/HTMLparser.c:6185–6204  ·  view source on GitHub ↗

* htmlCtxtReadFile: * @ctxt: an HTML parser context * @filename: a file or URL * @encoding: the document encoding, or NULL * @options: a combination of htmlParserOption(s) * * parse an XML file from the filesystem or the network. * This reuses the existing @ctxt parser context * * Returns the resulting document tree */

Source from the content-addressed store, hash-verified

6183 * Returns the resulting document tree
6184 */
6185htmlDocPtr
6186htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename,
6187 const char *encoding, int options)
6188{
6189 xmlParserInputPtr stream;
6190
6191 if (filename == NULL)
6192 return (NULL);
6193 if (ctxt == NULL)
6194 return (NULL);
6195
6196 htmlCtxtReset(ctxt);
6197
6198 stream = xmlLoadExternalEntity(filename, NULL, ctxt);
6199 if (stream == NULL) {
6200 return (NULL);
6201 }
6202 inputPush(ctxt, stream);
6203 return (htmlDoRead(ctxt, NULL, encoding, options, 1));
6204}
6205
6206/**
6207 * htmlCtxtReadMemory:

Callers 1

test_htmlCtxtReadFileFunction · 0.85

Calls 4

htmlCtxtResetFunction · 0.85
xmlLoadExternalEntityFunction · 0.85
inputPushFunction · 0.85
htmlDoReadFunction · 0.85

Tested by 1

test_htmlCtxtReadFileFunction · 0.68