Re: [xml] libxml2 xmlDocSetRootElement does not set root element

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@imag.fr)
Date: Wed Jan 10 2001 - 05:07:43 EST


On Wed, Jan 10, 2001 at 01:56:15AM -0800, Deja User wrote:
>
> Package: gnome-xml
> Version: 2.2.4
>
> There is a problem with libxml2-2.2.4 (also libxml2-2.2.10) that affects xmlDocSetRootElement. It is related to the problem of moving nodes between documents described in Todo.
>
> The function xmlDocSetRootElement uses xmlReplaceNode.

  only if there was already a root node !!!
otherwise it uses xmlAddSibling() which updates the linked list

> The element doc->children is not updated by xmlReplaceNode.
> The element doc->children is not updated by xmlUnlinkNode.
> The function xmlDocGetRootElement relies on doc->children.

  there might be problem when moving nodes between documents (especially
ID/IDREF and namespace links maintenance) but I think that the
main children/parent tree is correctly updated. If not be a bit more
specific please,

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
daniel@veillard.com  | libxml Gnome XML toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jan 10 2001 - 05:44:03 EST