const char* w;
while(xmlNode != NULL) {
- switch(xmlNode->type) {
- case XML_ELEMENT_NODE:
+
+ if((xmlNode->type) == XML_ELEMENT_NODE) {
child = node->createChild((const char*) xmlNode->name);
for(xmlNs* ns = xmlNode->nsDef; ns != NULL; ns = ns->next)
attributes(child, xmlNode->properties);
children(child, xmlNode->children);
- break;
- case XML_TEXT_NODE:
+ }
+ else if((xmlNode->type) == XML_TEXT_NODE) {
w = (const char*) xmlNode->content;
isSeparator = true;
isSeparator = false;
break;
}
-
w ++;
}
if(isSeparator == false)
node->createText(decode(xmlNode->content));
-
- break;
}
+
xmlNode = xmlNode->next;
}
}