public static function fromXml(\DOMDocument $xml)
    {
        $static = new static();

        $url = $xml->getElementsByTagName('resource');
        $static->autoLoginUrl = StringLiteral::fromXml($url);

        $code = $xml->getElementsByTagName('code');
        $static->code = StringLiteral::fromXml($code);

        return $static;
    }