* xmlTextWriterWriteDocCallback: * @context: the xmlBufferPtr * @str: the data to write * @len: the length of the data * * Write callback for the xmlOutputBuffer with target xmlBuffer * * Returns -1, 0, 1 */
| 4438 | * Returns -1, 0, 1 |
| 4439 | */ |
| 4440 | static int |
| 4441 | xmlTextWriterWriteDocCallback(void *context, const char *str, int len) |
| 4442 | { |
| 4443 | xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) context; |
| 4444 | int rc; |
| 4445 | |
| 4446 | if ((rc = xmlParseChunk(ctxt, str, len, 0)) != 0) { |
| 4447 | xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR, |
| 4448 | "xmlTextWriterWriteDocCallback : XML error %d !\n", |
| 4449 | rc); |
| 4450 | return -1; |
| 4451 | } |
| 4452 | |
| 4453 | return len; |
| 4454 | } |
| 4455 | |
| 4456 | /** |
| 4457 | * xmlTextWriterCloseDocCallback: |
nothing calls this directly
no test coverage detected