* 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 */
| 6554 | * Returns the resulting document tree |
| 6555 | */ |
| 6556 | htmlDocPtr |
| 6557 | htmlCtxtReadDoc(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: |
nothing calls this directly
no test coverage detected