MCPcopy Create free account
hub / github.com/WinMerge/winmerge / parseExternalByteInputStream

Method parseExternalByteInputStream

Externals/poco/XML/src/ParserEngine.cpp:323–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321
322
323void 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
350void ParserEngine::parseExternalCharInputStream(XML_Parser extParser, XMLCharInputStream& istr)

Callers

nothing calls this directly

Calls 3

XML_ParseFunction · 0.85
XML_GetErrorCodeFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected