Re: [xml] bug when parsing html?

On Thu, Oct 21, 2010 at 12:45:42PM +1300, Bevan Collins wrote:
I finally got to the bottom of a problem I was having when parsing html from
a thread other than the main thread.
In the function xmlInitializeGlobalState in globals.c,
inithtmlDefaultSAXHandler is only called if LIBXML_LEGACY_ENABLED is
Maybe it is documented somewhere that legacy APIs need to be enabled in
order to parse html on a non-main thread, but I never saw it.

  Hum ... it's more a problem of using SAXv1 instead of SAXv2
the SAXv2 default handler is initialized by htmlDefaultSAXHandlerInit()
which is being called by xmlInitParser.
And as the doc says
xmlInitParser() should be called from main if you use threads...
  For the SAXv1 handlers they are deprecated, hence the need for


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

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