RE: [xml] How to get pointer on attribute list?



Thanks Tom.
I was worry about that this field may could change in later versions
and therefore marked as non-common.
Your explanation is much more evident... 8)

-----Original Message-----
From: Thomas Broyer [mailto:tbroyer ltgt net]
Sent: Monday, October 15, 2001 7:34 PM
To: Henke, Markus
Cc: xml gnome org
Subject: Re: [xml] How to get pointer on attribute list?


Le 2001.10.15 19:10, "Henke, Markus" a écrit :
I'm looking for a way to parse the whole attribut list (in 
case i havn't
the attribute names and parse without using a DTD).
I've also noticed the field

  struct _xmlAttr *properties; /* properties list */

of the struct 

  xmlNode

but it's marked as non-common in the docs.

Yes, because only elements (represented by xmlNode's) have 
attributes. It's
not common to each node type (attribute node, PI node, 
comment node, text
node, etc.)
Each struct representing a DOM node in LibXML share some 
fields to allow
some kind of polymorphism, this field set is called the 
"common part" in
the docs.

So, how can i access the attribute list in a regular way?

Use the properties field after having checked type is 
XML_ELEMENT_NODE.

Tom.




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