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]