* xmlReadIO: * @ioread: an I/O read function * @ioclose: an I/O close function (optional) * @ioctx: an I/O handler * @URL: base URL (optional) * @encoding: the document encoding (optional) * @options: a combination of xmlParserOption * * Parse an XML document from I/O functions and context and build a tree. * * See xmlCtxtReadIO for details. * * Returns the resulting document tre
| 13994 | * Returns the resulting document tree |
| 13995 | */ |
| 13996 | xmlDocPtr |
| 13997 | xmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, |
| 13998 | void *ioctx, const char *URL, const char *encoding, int options) |
| 13999 | { |
| 14000 | xmlParserCtxtPtr ctxt; |
| 14001 | xmlParserInputPtr input; |
| 14002 | xmlDocPtr doc; |
| 14003 | |
| 14004 | ctxt = xmlNewParserCtxt(); |
| 14005 | if (ctxt == NULL) |
| 14006 | return(NULL); |
| 14007 | |
| 14008 | xmlCtxtUseOptions(ctxt, options); |
| 14009 | |
| 14010 | input = xmlNewInputIO(ctxt, URL, ioread, ioclose, ioctx, encoding, 0); |
| 14011 | |
| 14012 | doc = xmlCtxtParseDocument(ctxt, input); |
| 14013 | |
| 14014 | xmlFreeParserCtxt(ctxt); |
| 14015 | return(doc); |
| 14016 | } |
| 14017 | |
| 14018 | /** |
| 14019 | * xmlCtxtReadDoc: |
nothing calls this directly
no test coverage detected