Progressive parsing was my first idea, too.  Should work but may be a bit of
trouble to implement.

Another possibility would be to create your own exception (say
EarlyExitFromParseException).  Your SAX code could throw this exception when
it decides its time to quit and you catch it as below:

   try
   {
      parser->parse( *p_iSource );
   }
   catch ( EarlyExitFromParseException )
   {
        // Early exit
   }
   catch ( SaxParseException )
   {
      // Error exit
   }

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 4:53 PM
To: [EMAIL PROTECTED]
Subject: RE: Stopping a SAX, Mail archive down


I have not tried this ... but the parseFirst() and parseNext() calls of the
SAXParser class are something that may give you some lead ....

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 03, 2001 3:35 PM
> To: [EMAIL PROTECTED]
> Subject: Stopping a SAX, Mail archive down
> 
> 
> What's the best way to stop a SAX parse if you find what 
> you need near the top of a very large document?  
> 
> I haven't scanned the mail archive.  It appears to be down.
> 
> Cheers,
> Walker
> ---------------------------------------------------------------------
> 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