def fromDiscoveryResult(cls, discoveryResult):
    """Create endpoints from a DiscoveryResult.

        @type discoveryResult: L{DiscoveryResult}

        @rtype: list of L{OpenIDServiceEndpoint}

        @raises XRDSError: When the XRDS does not parse.

        @since: 2.1.0
        """
    if discoveryResult.isXRDS():
        method = cls.fromXRDS
    else:
        method = cls.fromHTML
    return method(discoveryResult.normalized_uri, discoveryResult.response_text
        )
