High,
try something like this. But ... it's a time ago when this code worked. I
did not verify it now.
Christiane      

///// EXAMPLE for progressive parse ////////////////////////

        mpSaxParser->setValidationScheme (SAXParser::Val_Auto); 
        
        // Parse the file and catch any exceptions that propagate out

        XMLPScanToken token;
        try {
                if (!mpSaxParser->parseFirst(szFileToParse, token,
bReuseValidator)) { 
                                // error
                }
        }
        catch (const XMLException& toCatch)     {
                // do something with exception
        }
        
        //
        // We started ok, so lets call parseNext()
        // until we find what we want or hit the end.
        //
        if (ret == RETURN_OK) {
                bool bGotMore = true;

                // parse until stop will be set in callback function or eof
                while (bGotMore && !getParserStop()) {
                        try {
                                bGotMore = mpSaxParser->parseNext(token);

                        }
                        catch (const XMLException& toCatch)     {
                                // do something with exception
                        }
                                
                        try {
                                mpSaxParser->parseReset(token);
                        }
                
                        catch (const XMLException& toCatch)     {
                                // do something with exception
                        }
                }
        }
///////////////////////////////////////////////////////////////

-----Urspr�ngliche Nachricht-----
Von: Erik Rydgren [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 15. Juni 2001 10:51
An: [EMAIL PROTECTED]
Betreff: RE: Can I Stop reader and start it again from where i stopped

Sorry, never used it myself.
Can someone else help Vinod with this, please?

/Erik

-----Original Message-----
From: Vinodkumar S [mailto:[EMAIL PROTECTED]]
Sent: den 15 juni 2001 10:50
To: '[EMAIL PROTECTED]'
Subject: RE: Can I Stop reader and start it again from where i stopped


Thanx Erik that was very useful, can please send an example how to use this
Parsefirst functions , i got little confused with this tokens , please do
reply
Wr
Vinod

-----Original Message-----
From: Erik Rydgren [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 12:47 PM
To: [EMAIL PROTECTED]
Subject: RE: Can I Stop reader and start it again from where i stopped


Use progressive parse.

Erik Rydgren
Mandarinen systems AB
Sweden

-----Original Message-----
From: Vinodkumar S [mailto:[EMAIL PROTECTED]]
Sent: den 15 juni 2001 07:56
To: '[EMAIL PROTECTED]'
Subject: RE: Can I Stop reader and start it again from where i stopped


Thanx for ur reply curt, but problem i should not use thread support, is any
other way to do it

-----Original Message-----
From: Curt Arnold [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 11:14 AM
To: [EMAIL PROTECTED]
Subject: Re: Can I Stop reader and start it again from where i stopped


Do the parse on its own thread and suspend the thread when you want to pause
the parse (something like WaitForSingleObject on Win32).


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

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


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

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


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

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

Reply via email to