* xmlParserInputBufferCreateIO: * @ioread: an I/O read function * @ioclose: an I/O close function * @ioctx: an I/O handler * @enc: the charset encoding if known * * Create a buffered parser input for the progressive parsing for the input * from an I/O handler * * Returns the new parser input or NULL */
| 2827 | * Returns the new parser input or NULL |
| 2828 | */ |
| 2829 | xmlParserInputBufferPtr |
| 2830 | xmlParserInputBufferCreateIO(xmlInputReadCallback ioread, |
| 2831 | xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc) { |
| 2832 | xmlParserInputBufferPtr ret; |
| 2833 | |
| 2834 | if (ioread == NULL) return(NULL); |
| 2835 | |
| 2836 | ret = xmlAllocParserInputBuffer(enc); |
| 2837 | if (ret != NULL) { |
| 2838 | ret->context = (void *) ioctx; |
| 2839 | ret->readcallback = ioread; |
| 2840 | ret->closecallback = ioclose; |
| 2841 | } |
| 2842 | |
| 2843 | return(ret); |
| 2844 | } |
| 2845 | |
| 2846 | #ifdef LIBXML_OUTPUT_ENABLED |
| 2847 | /** |
no test coverage detected