/** * @param string $xml * * @return EntitiesDescriptor */ public static function loadXml($xml) { $context = new DeserializationContext(); $context->getDocument()->loadXML($xml); $ed = new self(); $ed->deserialize($context->getDocument()->firstChild, $context); return $ed; }