[xml] A question on xmlUnlinkNode()
- From: "Daniel Haude" <dunno stoptrick com>
- To: xml gnome org
- Subject: [xml] A question on xmlUnlinkNode()
- Date: Wed, 01 Nov 2006 16:00:05 +0100
Hello all,
With the following code snippet I'm trying to wipe out all
contents of a given xmlNode "cell":
xmlNode *no;
for (no = cell->children; no; no = no->next) {
xmlUnlinkNode(no);
}
/* The following loop should print nothing. But the
child nodes are still there! */
for (no = cell->children; no; no = no->next) {
fprintf(stderr, "<%s> ", no->name);
}
fprintf(stderr, "\n");
/* and this, of course, makes things go "boom" when
I later try to save the file */
xmlFreeNodeList(cell->children);
Why doesn't this work?
Thanks!
--Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]