On Wed, Feb 08, 2006 at 05:59:53PM +0100, Cesar Ortiz wrote: > Hi, > > Perhaps I should ask this to > [email protected]<http://mail.gnome.org/mailman/listinfo/xml-bindings>but > looking into the archives, they are quite old. Is that list still > working? > Anyway I have not manage to find something useful... > > Looking at C examples that uses the function htmlParseChunk I have seen > this: > > ctxt = htmlCreatePushParserCtxt( > SAXHandler, &abort, buf, res, argv[1], 0); > > while ( !abort && (res = fread(buf, 1, 2048, f)) > 0) > htmlParseChunk(ctxt, buf, res, 0); > > Checking 'abort', you know that something has gone wrong and you have to > stop to pushing chunks to the parser. How you should do this in python?
you're using the HTML parser, which should never abort basically. The notion of fatal error where the parser stops emitting data (just more error message) exists only in the XML parser. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
