> try
> {
> SAX2PrintHandlers handler(encodingName, unRepFlags,
expandNamespaces);
> parser->setContentHandler(&handler);
> parser->setErrorHandler(&handler);
> //parser->parse(xmlFile);
> //errorCount = parser->getErrorCount();
> }
>
> catch (const XMLException& toCatch) { ... }
>
> // Added:
>
> XMLPScanToken token;
>
> if (!parser->parseFirst(xmlFile, token))
> {
> cerr << "scanFirst() failed\n" << endl;
> XMLPlatformUtils::Terminate();
> return 1;
> }
>
> ...
>
>
>It appears that the abort occurs in the call
>
> fErrorHandler->resetErrors();
>
>in the function
>
> void SAX2XMLReaderImpl::resetErrors()
>
>in the file
>
> SAX2XMLReaderImpl.cpp
The instance of SAX2PrintHandlers you are using is local to the try/catch
block and is destroyed before you start parsing. Moving it before the
block, or moving your parsing code within the block, will solve the
problem.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]