* htmlCtxtReadFile: * @ctxt: an HTML parser context * @filename: a file or URL * @encoding: the document encoding (optional) * @options: a combination of htmlParserOptions * * Parse an HTML file from the filesystem, the network or a * user-defined resource loader. * * See xmlNewInputURL and htmlCtxtUseOptions for details. * * Returns the resulting document tree */
| 6585 | * Returns the resulting document tree |
| 6586 | */ |
| 6587 | htmlDocPtr |
| 6588 | htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename, |
| 6589 | const char *encoding, int options) |
| 6590 | { |
| 6591 | xmlParserInputPtr input; |
| 6592 | |
| 6593 | if (ctxt == NULL) |
| 6594 | return (NULL); |
| 6595 | |
| 6596 | htmlCtxtReset(ctxt); |
| 6597 | htmlCtxtUseOptions(ctxt, options); |
| 6598 | |
| 6599 | input = xmlNewInputURL(ctxt, filename, NULL, encoding, 0); |
| 6600 | |
| 6601 | return(htmlCtxtParseDocument(ctxt, input)); |
| 6602 | } |
| 6603 | |
| 6604 | /** |
| 6605 | * htmlCtxtReadMemory: |