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

Re: [xml] manipulating attributes/values



On Tue, Apr 13, 2004 at 05:21:55PM +1000, Roger Reynolds wrote:
> 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?

  yes

> 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...

  xmlSetProp() and xmlSetNsProp()
  http://xmlsoft.org/html/libxml-tree.html#xmlSetNsProp

  the tree manipulations routines are usually in the tree module, 

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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