Re: [xml] Problem removing nodes from a document
- From: Keith Sharp <kms passback co uk>
- To: xml gnome org
- Subject: Re: [xml] Problem removing nodes from a document
- Date: Fri, 12 May 2006 12:08:03 +0100
On Fri, 2006-05-12 at 02:40 -0700, William M. Brack wrote:
Rather than point out the error with your coding, could I suggest that
you try to run your program under a "memory checker" (such as
Valgrind)
and see what it tells you? Using such tools before coming to a
mailing
list for assistance is generally a good approach :-).
Valgrind wasn't very useful, but stepping through in gdb showed that the
unlinking and freeing of the extension node was setting the parent->next
value to NULL, hence the program wasn't working as expected.
In the end I went with a different approach, I wrote a function to
create a list of node pointers where the node name was extensions and
then iterated over that list unlinking and freeing the nodes. Kind of
like getElementsByTagName.
Keith.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]