* xmlCtxtReadFile: * @ctxt: an XML parser context * @filename: a file or URL * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML file from the filesystem, the network or a user-defined * resource loader. * * Returns the resulting document tree */
| 14063 | * Returns the resulting document tree |
| 14064 | */ |
| 14065 | xmlDocPtr |
| 14066 | xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename, |
| 14067 | const char *encoding, int options) |
| 14068 | { |
| 14069 | xmlParserInputPtr input; |
| 14070 | |
| 14071 | if (ctxt == NULL) |
| 14072 | return(NULL); |
| 14073 | |
| 14074 | xmlCtxtReset(ctxt); |
| 14075 | xmlCtxtUseOptions(ctxt, options); |
| 14076 | |
| 14077 | input = xmlNewInputURL(ctxt, filename, NULL, encoding, 0); |
| 14078 | |
| 14079 | return(xmlCtxtParseDocument(ctxt, input)); |
| 14080 | } |
| 14081 | |
| 14082 | /** |
| 14083 | * xmlCtxtReadMemory: |