Re: [xml] libxml2 2.7.1 breaks XML serialisation of HTML trees



On Mon, Sep 08, 2008 at 03:01:29PM +0200, Stefan Behnel wrote:
Hi,

there was a change in 2.7.1 (xmlsave.c, ~760) that prevents HTML documents
from being serialised in XML style. That was actually a very convenient
feature in lxml, where you could select between XML and HTML serialisation
of an HTML tree based on a keyword argument.

I now wonder why there are two serialisation methods (xmlNodeDump* and
htmlNodeDump*) that ultimately do the same thing, instead of serialising
to what they are named after.

  Well the goal is more to get people to use xmlSave* than the old
xmlNodeDump and htmlNodeDump ones. Options are set at contect creation,
we can add more options and trying to keep the old functions to support the
same would require way too many entry points.

If the current behaviour is wanted, what's the future way of achieving
this *without* temporarily modifying the document? (i.e. without breaking
thread concurrency)

  Hum, sorry, clearly an oversight, I wanted to make xmlsave routines
HTML aware, which in itself  sounds a good idea, no ?
I guess we can use an xmlSave option to force the output to use the
HTML parser or the XML one and then make sure xmlNodeDump* and
htmlNodeDump* use them appropriately.

  Sorry for the breakage, I forgot the old xmlSave* had been remapped to
the new ones.

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]