Re: [xml] What's the meaning of returning -1 from htmlParseChunk?



On Wed, Mar 31, 2010 at 12:38:37PM +0800, Auguste Pop wrote:
I am new in using libxml and am trying to use this library to parse
real world HTML files.

According to the documentation, the function htmlParseChunk returns
"zero if no error, the xmlParseErrors otherwise". However, -1 is not
listed in the xmlParserErrors enum type. I am just wandering what's
the meaning of that?

It seems that after a return value of -1, all subsequent chunks are
simply ignored.

  This would seems to indicate the html parser think it reached the
end of the document or encountered something it can't recover from.
Check the errors emitted by the parser.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



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