Default support for arbitrary DOM objects.
[shibboleth/xmltooling.git] / xmltooling / io / Unmarshaller.cpp
index 1bc92d3..d0bba16 100644 (file)
@@ -46,7 +46,7 @@ const Unmarshaller* Unmarshaller::getUnmarshaller(const DOMElement* domElement)
     const Unmarshaller* m = getUnmarshaller(*(schemaType.get()));\r
     if (m) {\r
         if (log.isDebugEnabled()) {\r
-            log.debug("Located Unmarshaller for schema type: %s", schemaType->toString().c_str());\r
+            log.debug("located Unmarshaller for schema type: %s", schemaType->toString().c_str());\r
         }\r
         return m;\r
     }\r
@@ -55,16 +55,13 @@ const Unmarshaller* Unmarshaller::getUnmarshaller(const DOMElement* domElement)
     m = getUnmarshaller(*(elementName.get()));\r
     if (m) {\r
         if (log.isDebugEnabled()) {\r
-            log.debug("Located Unmarshaller for element name: %s", elementName->toString().c_str());\r
+            log.debug("located Unmarshaller for element name: %s", elementName->toString().c_str());\r
         }\r
         return m;\r
     }\r
 \r
-    log.error("No Unmarshaller was registered for element: %s", elementName->toString().c_str());\r
-    if (XMLToolingConfig::getConfig().ignoreUnknownElements) {\r
-    }\r
-    \r
-    return NULL;\r
+    log.error("no Unmarshaller registered for element (%s), using default", elementName->toString().c_str());\r
+    return m_default;\r
 }\r
 \r
 void Unmarshaller::destroyUnmarshallers()\r