Index: trunk/src/VBox/Main/include/ovfreader.h
===================================================================
--- trunk/src/VBox/Main/include/ovfreader.h	(revision 49028)
+++ trunk/src/VBox/Main/include/ovfreader.h	(revision 49029)
@@ -38,5 +38,4 @@
  * that one catch() for all xml::LogicError can handle all possible errors.
  */
-
 class OVFLogicError : public xml::LogicError
 {
@@ -44,4 +43,5 @@
     OVFLogicError(const char *aFormat, ...);
 };
+
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -371,5 +371,5 @@
     }
 
-    void checkConsistencyAndCompliance() throw (OVFLogicError)
+    void checkConsistencyAndCompliance() RT_THROW(OVFLogicError)
     {
         _checkConsistencyAndCompliance();
@@ -377,5 +377,5 @@
 
 protected:
-    virtual void _checkConsistencyAndCompliance() throw (OVFLogicError);
+    virtual void _checkConsistencyAndCompliance() RT_THROW(OVFLogicError);
     virtual const RTCString& getItemName()
     {
@@ -428,5 +428,5 @@
 
 protected:
-    virtual void _checkConsistencyAndCompliance() throw (OVFLogicError);
+    virtual void _checkConsistencyAndCompliance() RT_THROW(OVFLogicError);
 private:
     RTCString itemName;
@@ -474,5 +474,5 @@
 
 protected:
-    virtual void _checkConsistencyAndCompliance() throw (OVFLogicError);
+    virtual void _checkConsistencyAndCompliance() RT_THROW(OVFLogicError);
 private:
     RTCString itemName;
@@ -632,5 +632,4 @@
 </code>
  */
-
 class OVFReader
 {
Index: trunk/src/VBox/Main/xml/ovfreader.cpp
===================================================================
--- trunk/src/VBox/Main/xml/ovfreader.cpp	(revision 49028)
+++ trunk/src/VBox/Main/xml/ovfreader.cpp	(revision 49029)
@@ -133,14 +133,10 @@
     {
         const char *pcszElemName = pElem->getName();
-        const char *pcszTypeAttr = "";
-        const xml::AttributeNode *pTypeAttr;
-        if (    (pTypeAttr = pElem->findAttribute("type", "xsi")) != NULL
-             || (pTypeAttr = pElem->findAttribute("type")) != NULL
-           )
-            pcszTypeAttr = pTypeAttr->getValue();
-
-        if (    (!strcmp(pcszElemName, "DiskSection"))
-             || (    (!strcmp(pcszElemName, "Section"))
-                  && (!strcmp(pcszTypeAttr, "ovf:DiskSection_Type"))
+        const xml::AttributeNode *pTypeAttr = pElem->findAttribute("type");
+        const char *pcszTypeAttr = pTypeAttr ? pTypeAttr->getValue() : "";
+
+        if (    !strcmp(pcszElemName, "DiskSection")
+             || (    !strcmp(pcszElemName, "Section")
+                  && !strcmp(pcszTypeAttr, "ovf:DiskSection_Type")
                 )
            )
@@ -148,7 +144,7 @@
             HandleDiskSection(pReferencesElem, pElem);
         }
-        else if (    (!strcmp(pcszElemName, "NetworkSection"))
-                  || (    (!strcmp(pcszElemName, "Section"))
-                       && (!strcmp(pcszTypeAttr, "ovf:NetworkSection_Type"))
+        else if (    !strcmp(pcszElemName, "NetworkSection")
+                  || (    !strcmp(pcszElemName, "Section")
+                       && !strcmp(pcszTypeAttr, "ovf:NetworkSection_Type")
                      )
                 )
@@ -156,23 +152,23 @@
             HandleNetworkSection(pElem);
         }
-        else if (    (!strcmp(pcszElemName, "DeploymentOptionSection")))
+        else if (    !strcmp(pcszElemName, "DeploymentOptionSection"))
         {
             // TODO
         }
-        else if (    (!strcmp(pcszElemName, "Info")))
+        else if (    !strcmp(pcszElemName, "Info"))
         {
             // child of VirtualSystemCollection -- TODO
         }
-        else if (    (!strcmp(pcszElemName, "ResourceAllocationSection")))
+        else if (    !strcmp(pcszElemName, "ResourceAllocationSection"))
         {
             // child of VirtualSystemCollection -- TODO
         }
-        else if (    (!strcmp(pcszElemName, "StartupSection")))
+        else if (    !strcmp(pcszElemName, "StartupSection"))
         {
             // child of VirtualSystemCollection -- TODO
         }
-        else if (    (!strcmp(pcszElemName, "VirtualSystem"))
-                  || (    (!strcmp(pcszElemName, "Content"))
-                       && (!strcmp(pcszTypeAttr, "ovf:VirtualSystem_Type"))
+        else if (    !strcmp(pcszElemName, "VirtualSystem")
+                  || (    !strcmp(pcszElemName, "Content")
+                       && !strcmp(pcszTypeAttr, "ovf:VirtualSystem_Type")
                      )
                 )
@@ -180,7 +176,7 @@
             HandleVirtualSystemContent(pElem);
         }
-        else if (    (!strcmp(pcszElemName, "VirtualSystemCollection"))
-                  || (    (!strcmp(pcszElemName, "Content"))
-                       && (!strcmp(pcszTypeAttr, "ovf:VirtualSystemCollection_Type"))
+        else if (    !strcmp(pcszElemName, "VirtualSystemCollection")
+                  || (    !strcmp(pcszElemName, "Content")
+                       && !strcmp(pcszTypeAttr, "ovf:VirtualSystemCollection_Type")
                      )
                 )
@@ -215,9 +211,9 @@
         const char *pcszDiskId;
         const char *pcszFormat;
-        if (!(pelmDisk->getAttributeValue("diskId", pcszDiskId)))
+        if (!pelmDisk->getAttributeValue("diskId", pcszDiskId))
             pcszBad = "diskId";
-        else if (!(pelmDisk->getAttributeValue("format", pcszFormat)))
+        else if (!pelmDisk->getAttributeValue("format", pcszFormat))
             pcszBad = "format";
-        else if (!(pelmDisk->getAttributeValue("capacity", d.iCapacity)))
+        else if (!pelmDisk->getAttributeValue("capacity", d.iCapacity))
             pcszBad = "capacity";
         else
@@ -226,5 +222,5 @@
             d.strFormat = pcszFormat;
 
-            if (!(pelmDisk->getAttributeValue("populatedSize", d.iPopulatedSize)))
+            if (!pelmDisk->getAttributeValue("populatedSize", d.iPopulatedSize))
                 // optional
                 d.iPopulatedSize = -1;
@@ -239,5 +235,5 @@
                 const xml::ElementNode *pFileElem;
                 if (    pReferencesElem
-                     && ((pFileElem = pReferencesElem->findChildElementFromId(pcszFileRef)))
+                     && (pFileElem = pReferencesElem->findChildElementFromId(pcszFileRef)) != NULL
                    )
                 {
@@ -246,7 +242,7 @@
                     const char *pcszBadInFile = NULL;
                     const char *pcszHref;
-                    if (!(pFileElem->getAttributeValue("href", pcszHref)))
+                    if (!pFileElem->getAttributeValue("href", pcszHref))
                         pcszBadInFile = "href";
-                    else if (!(pFileElem->getAttributeValue("size", d.iSize)))
+                    else if (!pFileElem->getAttributeValue("size", d.iSize))
                         d.iSize = -1;       // optional
 
@@ -350,8 +346,6 @@
         if (!strcmp(pcszElemName, "Section"))       // OVF 0.9 used "Section" element always with a varying "type" attribute
         {
-            const xml::AttributeNode *pTypeAttr;
-            if (    (pTypeAttr = pelmThis->findAttribute("type")) != NULL
-                 || (pTypeAttr = pelmThis->findAttribute("type", "xsi")) != NULL
-               )
+            const xml::AttributeNode *pTypeAttr = pelmThis->findAttribute("type");
+            if (!pTypeAttr)
                 pcszTypeAttr = pTypeAttr->getValue();
             else
@@ -361,6 +355,6 @@
         }
 
-        if (    (!strcmp(pcszElemName, "EulaSection"))
-             || (!strcmp(pcszTypeAttr, "ovf:EulaSection_Type"))
+        if (    !strcmp(pcszElemName, "EulaSection")
+             || !strcmp(pcszTypeAttr, "ovf:EulaSection_Type")
            )
         {
@@ -374,6 +368,6 @@
                 vsys.strLicenseText = pelmLicense->getValue();
         }
-        if (    (!strcmp(pcszElemName, "ProductSection"))
-             || (!strcmp(pcszTypeAttr, "ovf:ProductSection_Type"))
+        if (    !strcmp(pcszElemName, "ProductSection")
+             || !strcmp(pcszTypeAttr, "ovf:ProductSection_Type")
            )
         {
@@ -402,6 +396,6 @@
                 vsys.strVendorUrl = pelmVendorUrl->getValue();
         }
-        else if (    (!strcmp(pcszElemName, "VirtualHardwareSection"))
-                  || (!strcmp(pcszTypeAttr, "ovf:VirtualHardwareSection_Type"))
+        else if (    !strcmp(pcszElemName, "VirtualHardwareSection")
+                  || !strcmp(pcszTypeAttr, "ovf:VirtualHardwareSection_Type")
                 )
         {
@@ -526,7 +520,7 @@
 
                     case ResourceType_Memory:        // 4
-                        if (    (i.strAllocationUnits == "MegaBytes")           // found in OVF created by OVF toolkit
-                             || (i.strAllocationUnits == "MB")                  // found in MS docs
-                             || (i.strAllocationUnits == "byte * 2^20")         // suggested by OVF spec DSP0243 page 21
+                        if (    i.strAllocationUnits == "MegaBytes"           // found in OVF created by OVF toolkit
+                             || i.strAllocationUnits == "MB"                  // found in MS docs
+                             || i.strAllocationUnits == "byte * 2^20"         // suggested by OVF spec DSP0243 page 21
                            )
                             vsys.ullMemorySize = i.ullVirtualQuantity * _1M;
@@ -797,6 +791,6 @@
             }
         }
-        else if (    (!strcmp(pcszElemName, "OperatingSystemSection"))
-                  || (!strcmp(pcszTypeAttr, "ovf:OperatingSystemSection_Type"))
+        else if (    !strcmp(pcszElemName, "OperatingSystemSection")
+                  || !strcmp(pcszTypeAttr, "ovf:OperatingSystemSection_Type")
                 )
         {
@@ -908,5 +902,5 @@
 }
 
-void VirtualHardwareItem::_checkConsistencyAndCompliance() throw (OVFLogicError)
+void VirtualHardwareItem::_checkConsistencyAndCompliance() RT_THROW(OVFLogicError)
 {
     RTCString name = getItemName();
@@ -987,5 +981,5 @@
 
 
-void StorageItem::_checkConsistencyAndCompliance() throw (OVFLogicError)
+void StorageItem::_checkConsistencyAndCompliance() RT_THROW(OVFLogicError)
 {
     VirtualHardwareItem::_checkConsistencyAndCompliance();
@@ -1044,5 +1038,5 @@
 }
 
-void EthernetPortItem::_checkConsistencyAndCompliance() throw (OVFLogicError)
+void EthernetPortItem::_checkConsistencyAndCompliance() RT_THROW(OVFLogicError)
 {
     VirtualHardwareItem::_checkConsistencyAndCompliance();
