This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nemeskeyd
Recipients amaury.forgeotdarc, nemeskeyd
Date 2012-08-28.08:17:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
OK, then this issue has a "bug" part, too: it is not mentioned in the documentation that exceptions from the handler methods propagate through the Parse() method. I guess the parser can be then stopped in this way too, but it is a dirty method as opposed to calling StopParser().

To answer your question, there are several situations where StopParser() could come in handy. For instance, the XML file might contain records (such as the output of a search engine), from which we only need the first n. Another example would be that reading through the file we realize halfway that e.g. it does not contain the information we need, contains wrong information, etc. so we want to skip the rest of it. Since the file might be huge and since XML parsing can in now way be considered fast, being able to stop the parsing in a clear way would spare the superfluous and possible lengthy computation.
Date User Action Args
2012-08-28 08:17:05nemeskeydsetrecipients: + nemeskeyd, amaury.forgeotdarc
2012-08-28 08:17:05nemeskeydsetmessageid: <>
2012-08-28 08:17:04nemeskeydlinkissue15775 messages
2012-08-28 08:17:04nemeskeydcreate