public static function parseFile($file)
{
$data = \SimpleSAML\Utils\HTTP::fetch($file);
try {
$doc = \SAML2\DOMDocumentFactory::fromString($data);
} catch (\Exception $e) {
throw new Exception('Failed to read XML from file: ' . $file);
}
return self::parseDocument($doc);
}