Closed Opariti closed 5 years ago
Use mxmlElementGetAttrCount
and mxmlElementGetAttrByIndex
, e.g.:
mxml_node_t *element;
int i, count;
const char *name, *value;
for (i = 0, count = mxmlElementGetAttrCount(element); i < count; i ++)
{
value = mxmlElementGetAttrByIndex(element, i, &name);
printf("%s=\"%s\"\n", name, value);
}
Those functions were added in Mini-XML v2.11...
Many thanks Michael!
Hi, I used to get, in version 2.11 the names AND values fo a node's attributes. In v.3 I have only the possibility to iterate and get the attributes' values, but not their name. How could I solve this (getting node's both attribute's name and value, by index)? Thanks