Re: [xml] Aborting html sax parsing from python



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);

though I'm not sure it's properly handled by the HTML parser.

Seems to be generated as a class method for parsing context as expected:

paphio:~/XML -> grep stopParser python/libxml2.py
    def stopParser(self):


I do not find too much info about the python bindings. Do you know about any
resource besides http://xmlsoft.org/python.html, the pydoc and the
distribution tests?

  In general you will have to fallback to the C documentation, C functions
are usually translated to method on python xml classes of one of the arguments
with the function name prefix stripped and first letter turned to lowercase.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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