| 321 | |
| 322 | |
| 323 | void ParserEngine::parseExternalByteInputStream(XML_Parser extParser, XMLByteInputStream& istr) |
| 324 | { |
| 325 | char *pBuffer = new char[PARSE_BUFFER_SIZE]; |
| 326 | try |
| 327 | { |
| 328 | std::streamsize n = readBytes(istr, pBuffer, PARSE_BUFFER_SIZE); |
| 329 | while (n > 0) |
| 330 | { |
| 331 | if (!XML_Parse(extParser, pBuffer, static_cast<int>(n), 0)) |
| 332 | handleError(XML_GetErrorCode(extParser)); |
| 333 | if (istr.good()) |
| 334 | n = readBytes(istr, pBuffer, PARSE_BUFFER_SIZE); |
| 335 | else |
| 336 | n = 0; |
| 337 | } |
| 338 | if (!XML_Parse(extParser, pBuffer, 0, 1)) |
| 339 | handleError(XML_GetErrorCode(extParser)); |
| 340 | } |
| 341 | catch (...) |
| 342 | { |
| 343 | delete [] pBuffer; |
| 344 | throw; |
| 345 | } |
| 346 | delete [] pBuffer; |
| 347 | } |
| 348 | |
| 349 | |
| 350 | void ParserEngine::parseExternalCharInputStream(XML_Parser extParser, XMLCharInputStream& istr) |
nothing calls this directly
no test coverage detected