[XML-SIG] How to stop parser
Remy C. Cool
Tue, 10 Dec 2002 17:11:50 +0100
Thanks, I was looking for an answer useable inside the handler, but
this will do nicely :)
On Tuesday 10 December 2002 16:33, Fred L. Drake, Jr. wrote:
> Remy C. Cool writes:
> > Warnings, errors and fatalErrors are handled by my own defined
> > functions in the parser. They append the warning/error to a list
> > which can be read by the main program when the parser returns.
> > How can I raise an SAXException so that the parser will return
> > without halting the program ?
> Raise the exception in your handler using a raise statement, then
> catch it using a try/except statement where you call the parser.
> Your application can then examine the accululated state as it sees