bool processed = false;
if (child->type == XML_ELEMENT_NODE) {
- xmlElement *elem = reinterpret_cast<xmlElement *>(child);
-
// Find the ID, if any.
string id;
-#if 0
- for (xmlAttribute *attr = elem->attributes; attr != NULL; attr = attr->nexth) {
+ for (xmlAttr *attr = child->properties; attr != NULL; attr = attr->next) {
// FIXME: namespace
if (strcmp(reinterpret_cast<const char *>(attr->name), "id") != 0) {
continue;
}
- id = xmlNodeGetContent(attr->content);
+ id = reinterpret_cast<const char *>(xmlNodeGetContent(attr->children));
}
-#endif
// Check all substitutions to see if we found anything appropriate.
for (auto it : substitution_map) {
if (it.first == reinterpret_cast<const char *>(child->name) ||
- (!id.empty() && ("#" + it.first) == id)) {
+ (!id.empty() && it.first == ("#" + id))) {
it.second->process(child, clean);
processed = true;
break;