Greetings:

First, I apologize if this is the wrong forum for this question.
I couldn't find any that seemed more appropriate.

Platform details: Xerces C++ 2.3.0,  AIX 5.1,  xlC 5.0.2 

I've been trying to learn Xerces C++ by reading the documentation,
looking at the source, and modifying the provided sample programs.
I've been attempting to take a first pass at progressive parsing
via SAX2 by modifying the sample program SAX2Print.cpp to use
parseFirst() and parseNext().

When I run the modified program, it aborts with the message
"IOT/Abort trap(coredump)".

Details:

I began by making a simple modification to the sample program
SAX2Print.cpp as follows.  I commented out the two lines
in the try block shown below, and then added the additional
code as shown:


    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

That's as much as I've been able to determine in my debugging
attempts.  Any ideas or suggestions?  Should the modification to
the sample work as I intended?  Thanks.

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to