Re: [xml] Aborting html sax parsing from python



Daniel Veillard wrote:
On Thu, Oct 27, 2005 at 02:54:37PM +0200, Cesar Ortiz wrote:

Hi all,

I am trying to use the python bindings of libxml in order to parse html with
SAX.
I would like to be able to stop the parsing of a document from a callback. I
have tried to do it but the parser complains.
How I could do that?


  the routine at the C level is

void
xmlStopParser(xmlParserCtxtPtr ctxt);

We had a discussion some months ago concerning handling of python exceptions
raised in callbacks. The idea was to pass exceptions through the C layer
such that they could be caught at (python) application level.

Is this now supported ? That might be the simplest way to achieve what the OP
wants without the need to touch any low-level API.

Regards,
                Stefan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]