Re: [xml] xmlAddChild() vs. xmlAddChildList()
- From: Daniel Veillard <veillard redhat com>
- To: Roelant Ossewaarde <miep boektrust nl>
- Cc: xml gnome org
- Subject: Re: [xml] xmlAddChild() vs. xmlAddChildList()
- Date: Mon, 16 Jun 2003 09:28:01 -0400
On Mon, Jun 16, 2003 at 01:16:30PM +0000, Roelant Ossewaarde wrote:
Suppose I have a number of children-nodes attached to a parent. Suppose I take one of these children-nodes
and add it to another parent. I would expect the behaviour of xmlAddChild() and xmlAddChildList() to differ
in this respect, such that xmlAddChild ONLY adds this particular child, and xmlAddChildList adds this
particular child and all other nodes attached to this child via 'next'.
[...]
Is my understanding of the difference between AddChild() and AddChildList() wrong, or not? Bug or feature?
Basically, xmlAddChild expects an unlinked node, i.e. all the
prev, next, parent links to be NULL. The simplest way to achieve that
if the node isn't a new one is to call xmlUnlinkNode() . But you're
right that the problem you expose should be fixed anyway, could you
add it to bugzilla so I don't forget this,
thanks from a sunny Dublin,
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]