public function analyze(SendResult $response)
    {
        $analyzeResponse = new Result($response);

        $domXpath = $this->makeDomXpath($response->responseXml);

        //General error level in the transmissionError location:
        $errorCodeNodeList = $domXpath->query(self::Q_G_ERR);
        if ($errorCodeNodeList->length > 0) {
            $errorCatNode = $domXpath->query(self::Q_G_CAT)->item(0);
            $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode));

            $code = $errorCodeNodeList->item(0)->nodeValue;
            $errorTextNodeList = $domXpath->query(self::Q_G_MSG);
            $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList);

            $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'general');
        }

        //Deficient FOP level errors:
        $errorCodeNodeList = $domXpath->query(self::Q_D_ERR);

        if ($errorCodeNodeList->length > 0) {
            $errorCatNode = $domXpath->query(self::Q_D_CAT)->item(0);
            $analyzeResponse->setStatus($this->makeStatusForPotentiallyNonExistent($errorCatNode));

            $code = $errorCodeNodeList->item(0)->nodeValue;

            $errorTextNodeList = $domXpath->query(self::Q_D_MSG);
            $message = $this->makeMessageFromMessagesNodeList($errorTextNodeList);

            $analyzeResponse->messages[] = new Result\NotOk($code, trim($message), 'deficient_fop');
        }

        return $analyzeResponse;
    }