[xml] Remove all atttributes from a node
- From: Rush Manbert <rush manbert com>
- To: xml gnome org
- Subject: [xml] Remove all atttributes from a node
- Date: Mon, 06 Feb 2006 13:53:58 -0800
Hi all,
Another one I can't figure out from the docs or the archive.
Does anyone know how to remove all of the attributes from an element
using the tree API?
My use case is that I have a xmlNodePtr to the current node (element),
and a list of xmlChar* name/value pairs that represent the attributes
that the element should contain. But the element already contains some
unknown set of attributes that I need to remove first. (I can't just
remove the current node and replace with a new one because I'm trying to
retain any namespace specification that the node carries.)
It looks like I could use xmlFreePropList if I had the proper xmlAttrPtr
argument to pass it, but I don't know how to get the xmlAttrPtr.
Can anyone please help me out? Is there some better way to do this?
Thanks in advance,
Rush
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]