[prev in list] [next in list] [prev in thread] [next in thread]
List: python-xml-sig
Subject: [XML-SIG] How to stop parser
From: dev-xml () smartology ! nl (Remy C ! Cool)
Date: 2002-12-10 16:11:50
Message-ID: 200212101711.06468.dev-xml () smartology ! nl
[Download RAW message or body]
Thanks, I was looking for an answer useable inside the handler, but
this will do nicely :)
Remy
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
> fit.
>
>
> -Fred
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic