I'm having trouble to find a way to extract a list of all properties of a node without knowing what they're called.
I'm extracting single known properties using:
xmlGetProp(cur, (const xmlChar*)"nodename")
But how to get a list of all properties using libxml2?
Regards, marius
Simply loop through the node's properties list, ie:
xmlNodePtr Node = ...;
for(xmlAttrPtr attr = Node->properties; NULL != attr; attr = attr->next)
{
... do something with attr ...
... the name of the attribute is in attr->name ...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With