* xmlCtxtReadIO: * @ctxt: an XML parser context * @ioread: an I/O read function * @ioclose: an I/O close function * @ioctx: an I/O handler * @URL: the base URL to use for the document * @encoding: the document encoding, or NULL * @options: a combination of xmlParserOption * * parse an XML document from I/O functions and source and build a tree. * This reuses the existing @ctxt par
| 14174 | * Returns the resulting document tree |
| 14175 | */ |
| 14176 | xmlDocPtr |
| 14177 | xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread, |
| 14178 | xmlInputCloseCallback ioclose, void *ioctx, |
| 14179 | const char *URL, |
| 14180 | const char *encoding, int options) |
| 14181 | { |
| 14182 | xmlParserInputPtr input; |
| 14183 | |
| 14184 | if (ctxt == NULL) |
| 14185 | return(NULL); |
| 14186 | |
| 14187 | xmlCtxtReset(ctxt); |
| 14188 | xmlCtxtUseOptions(ctxt, options); |
| 14189 | |
| 14190 | input = xmlNewInputIO(ctxt, URL, ioread, ioclose, ioctx, encoding, 0); |
| 14191 | |
| 14192 | return(xmlCtxtParseDocument(ctxt, input)); |
| 14193 | } |
| 14194 |
no test coverage detected