asXML(); } else if (is_string($xmlData)) { $strXmlData = $xmlData; } else { require_once 'Zend/InfoCard/Xml/Exception.php'; throw new Zend_InfoCard_Xml_Exception("Invalid Data provided to create instance"); } $sxe = simplexml_load_string($strXmlData); $namespaces = $sxe->getDocNameSpaces(); foreach($namespaces as $namespace) { switch($namespace) { case self::TYPE_SAML: include_once 'Zend/InfoCard/Xml/Assertion/Saml.php'; return simplexml_load_string($strXmlData, 'Zend_InfoCard_Xml_Assertion_Saml', null); } } require_once 'Zend/InfoCard/Xml/Exception.php'; throw new Zend_InfoCard_Xml_Exception("Unable to determine Assertion type by Namespace"); } }