Re: [xml] child nodes disappear after call to xmlNodeSetContent()
- From: danilo gnome org (Danilo Åegan)
- To: "Markus STROBL" <m strobl racon-linz at>
- Cc: xml gnome org
- Subject: Re: [xml] child nodes disappear after call to xmlNodeSetContent()
- Date: Tue, 18 Jan 2005 14:15:52 +0100
Today at 13:41, Markus STROBL wrote:
after every call to xmlNodeSetContent, all the childs are removed!
This way, you're basically removing references to all the other
subnodes, and inserting a single text node. Btw, how do you think you
could get something like this:
<a>foo
<b>blah</b>
bar
</a>
if you had <a><b>blah</b></a>? What would you expect SetContent to do
in such cases? (I'm just showing that this behavior is simply logical)
You most likely want to construct 'text' nodes, and insert them
instead of using SetContent: watch out for keeping proper relations
(->children, ->next, ->prev) between nodes. I know this only from
Python bindings, so I cannot help you with concrete code.
Cheers,
Danilo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]