List Info

Thread: htmlParseChunk() breaks on error?




htmlParseChunk() breaks on error?
country flaguser name
Germany
2007-03-22 16:14:54
Hi,

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?
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 hope you can bring some light in the dark! 
Thanks for reading.

Greetings
Manuel Jung
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml

Re: htmlParseChunk() breaks on error?
user name
2007-03-23 02:50:52
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/v
irtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillardredhat.com  | 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/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )