How to stop parsing XML in SAX
Hi,
I'm using "standard" XML library by Sun.
The parsing model is SAX (extending DefaultHandler).
How do I signal the XML parser to stop parsing?
(the reason is for example a data error is encountered and there is a need to cancel parsing any further)
Thanks.
[311 byte] By [
Nik_Java] at [2007-9-26 3:17:08]

I believe that's the only way. I created a PauseXMLParsingException that extends SAXException and then throw that. I Catch it in the calling code and know I stopped where I wanted without errors. What I'm searching for now is a way to resume parsing where I left off. However, my input stream is getting closed somehow when I throw the exception. If anyone has any ideas they would be much appreaciated :)
I'm searching a way to restart saxParser after stopped it and reload XML document at the point where saxParser stopped.
If I use SAXException and stopped the Parser... after? How do I do it?
I think to use Thread, but I'm afraid I'll have same problem with this solution....
anybody have an good idea to do it?
Thanks in advance,
Angie