diff --git a/lib/SimpleSAML/Utils/XML.php b/lib/SimpleSAML/Utils/XML.php
index 092de6cbe9845493e155d77868a1b664f8b4daa3..9750634c1714b4bb2c734caaa0eb567e3f758beb 100644
--- a/lib/SimpleSAML/Utils/XML.php
+++ b/lib/SimpleSAML/Utils/XML.php
@@ -8,7 +8,6 @@
 namespace SimpleSAML\Utils;
 
 use SimpleSAML\Logger;
-use Symfony\Component\Config\Definition\Exception\Exception;
 
 class XML
 {
@@ -405,7 +404,7 @@ class XML
             try {
                 $dom = \SAML2_DOMDocumentFactory::fromString($xml);
                 $res = true;
-            } catch (Exception $e) {
+            } catch (\Exception $e) {
                 $res = false;
             }
         }