* xmlParserInputBufferCreateIO: * @ioread: an I/O read function * @ioclose: an I/O close function * @ioctx: an I/O handler * @enc: the charset encoding if known (deprecated) * * Create a buffered parser input for the progressive parsing for the input * from an I/O handler * * The encoding argument is deprecated and should be set to * XML_CHAR_ENCODING_NONE. The encoding can be change
| 2165 | * Returns the new parser input or NULL |
| 2166 | */ |
| 2167 | xmlParserInputBufferPtr |
| 2168 | xmlParserInputBufferCreateIO(xmlInputReadCallback ioread, |
| 2169 | xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc) { |
| 2170 | xmlParserInputBufferPtr ret; |
| 2171 | |
| 2172 | if (ioread == NULL) return(NULL); |
| 2173 | |
| 2174 | ret = xmlAllocParserInputBuffer(enc); |
| 2175 | if (ret != NULL) { |
| 2176 | ret->context = (void *) ioctx; |
| 2177 | ret->readcallback = ioread; |
| 2178 | ret->closecallback = ioclose; |
| 2179 | } |
| 2180 | |
| 2181 | return(ret); |
| 2182 | } |
| 2183 | |
| 2184 | #ifdef LIBXML_OUTPUT_ENABLED |
| 2185 | /** |
no test coverage detected