public function createEntityDescriptor($xml)
    {
        $deserializationContext = new DeserializationContext();
        $deserializationContext->getDocument()->loadXML($xml);

        $ed = new EntityDescriptor();
        $ed->deserialize($deserializationContext->getDocument(), $deserializationContext);

        return $ed;
    }