Re: [xml] htmlParseChunk() breaks on error?



On Thu, Mar 22, 2007 at 10:14:54PM +0100, Manuel Jung wrote:
Im parsing some real life html and using the function htmlParseChunk(). It 
often reports parsing errors. Does libxml2 stop at the place, where the error 
occurs (I use the push parser)? Or does it continue to the end of the 
document as good as it can?

  It continues

I would like it not to stop of course. I also set the 
option "HTML_PARSE_RECOVER". What exactly does this mean? Is that documentet 
somewhere? there is only a comment "Relaxed parsing" and i dont want to 
guess...

  I'm not sure that option is ever used, libxml2 tries to recover in case
of HTML parsing errors, but it won't try to tidy up.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]