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
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml