Re: [xml] C API question: reading attribute name?

On Wed, May 11, 2005 at 12:50:57PM -0500, Jeremy Enos wrote:
Daniel Veillard wrote:
I think the solution is explained at
You can either:
- loop with for all values of 0 .. AttributeCount() - 1
  and use MoveToAttributeNo(no) then use Name()/Prefix()/NamespaceUri()...
- or use MoveToNextAttribute()
  and similary use Name()/Prefix()/NamespaceUri()

the small Python example in that doc shows the second one.

I did not design this API, this is directly copied from C# xmlReader API.

However, I don't know a way to acquire a pointer to the first attribute 

  You don't need to.
  Read my answer you have the solution you asked, just in front of you.


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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