Suuports clang compiler
[anna.git] / source / xml / Parser.cpp
index 53a8f80..30c2909 100644 (file)
@@ -125,8 +125,8 @@ throw(RuntimeException) {
   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)
@@ -138,8 +138,8 @@ throw(RuntimeException) {
 
       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;
 
@@ -148,16 +148,14 @@ throw(RuntimeException) {
           isSeparator = false;
           break;
         }
-
         w ++;
       }
 
       if(isSeparator == false)
         node->createText(decode(xmlNode->content));
-
-      break;
     }
 
+
     xmlNode = xmlNode->next;
   }
 }