Re: [xml] Need a API that iterates through Attributes on a givne node



Hi Mark,

Today at 15:22, Mark A. Jones wrote:

I am using version 2-2.6.4 of the libxml2 library and am looking for
an API that would allow me to iterate through all the attributes of
a given reader node.  I'm hoping the iterator will return a
structure with both an attribute name and its value.  

I believe all you need to do is fetch a pointer to first attribute
("property"), and then simply use ->next in order to cycle through the
attribute list. 

At least that's how Python bindings and xmlNode.properties (or
.get_properties()) seem to work.  So, I may be wrong, but even C
implementation of properties seems to indicate this is the case.

Cheers,
Danilo



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