protected static function __parseResponseToNewObject($response, $uri, $client) {
    $dom = new DOMDocument();

    // Attempt to prevent XXE that could be exploited through loadXML()
    libxml_disable_entity_loader(true);

    if (empty($response->body) || !$dom->loadXML($response->body, LIBXML_NOBLANKS)) {
      return null;
    }

    $rootNode = $dom->documentElement;

    $obj = Recurly_Resource::__createNodeObject($rootNode, $client);
    Recurly_Resource::__parseXmlToObject($rootNode->firstChild, $obj, $client);
    if ($obj instanceof self) {
      $obj->_afterParseResponse($response, $uri);
      $obj->setHeaders($response->headers);
    }
    return $obj;
  }