[xml] manipulating attributes/values



Hello libxml2 mailing list.

I am attempting to port an application (on solaris) that uses the Oracle XDK
xml parser library
to use libxml2 (version 2.6.8) and I'm trying to figure out how/if I can do
various things
with libxml2 that I have done with oraxml.

One such item is the oraxml function setAttribute(node, name, value)
which will either create a new attribute node under the specified node,
having the specified name and value, or if the node already has an attribute
node with the specified name, replace it's current value with the newly
specified value.

Easy...

I suppose I need to manually traverse the child nodes of my node, looking
for
an appropriately named attribute node, and then I can use  xmlNodeSetContent
if I
find one,  or I can create a new attribute node (property) if I don't find
one...

That sound about right?

I appologize in advance for not being as familiar with libxml as I might be.
I have been looking over the code and examples most of the day...

Thanks in advance for any help.

roger




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]