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

Function htmlCtxtReadDoc

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:6556–6571  ·  view source on GitHub ↗

* htmlCtxtReadDoc: * @ctxt: an HTML parser context * @str: a pointer to a zero terminated string * @URL: only used for error reporting (optional) * @encoding: the document encoding (optional) * @options: a combination of htmlParserOptions * * Parse an HTML in-memory document and build a tree. * * See htmlCtxtUseOptions for details. * * Returns the resulting document tree */

Source from the content-addressed store, hash-verified

6554 * Returns the resulting document tree
6555 */
6556htmlDocPtr
6557htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar *str,
6558 const char *URL, const char *encoding, int options)
6559{
6560 xmlParserInputPtr input;
6561
6562 if (ctxt == NULL)
6563 return (NULL);
6564
6565 htmlCtxtReset(ctxt);
6566 htmlCtxtUseOptions(ctxt, options);
6567
6568 input = xmlNewInputString(ctxt, URL, (const char *) str, encoding, 0);
6569
6570 return(htmlCtxtParseDocument(ctxt, input));
6571}
6572
6573/**
6574 * htmlCtxtReadFile:

Callers

nothing calls this directly

Calls 4

htmlCtxtResetFunction · 0.85
htmlCtxtUseOptionsFunction · 0.85
xmlNewInputStringFunction · 0.85
htmlCtxtParseDocumentFunction · 0.85

Tested by

no test coverage detected