Re: [xml] Why doesn't xmlAddChild unlink the node first?

On Wed, Sep 05, 2007 at 12:31:38PM +0200, Bertrand Fritsch wrote:

I wonder why the xmlAddChild function doesn't unlink the node before 
adding it to the tree, whereas xmlAddNextSibling and xmlAddSibling 
functions do it? What is the rationale behind this? From a caller POV, 
the difference is compelling since the work to do to call these function 
is not the same in one case than in the other.

  No rationale, just diverging evolution. If you really care about
this I take patches, but that won't dispense you from doing that
xmlUnlinkNode() to avoid compatibility issues.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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