private function downloadXml($fileName, $xml)
    {
        //$response = new HttpResponse();
        $response = $this->getResponse();

        $headers  = $response->getHeaders();
        $headers->addHeaderLine('Content-Type', 'text/xml; charset=utf-8');
        $headers->addHeaderLine('Content-Disposition', "attachment; filename=\"".$fileName."\"");
        $headers->addHeaderLine('Accept-Ranges', 'bytes');
        $headers->addHeaderLine('Content-Length', strlen($xml));
        $headers->addHeaderLine('fileName', $fileName);
        $response->setContent($xml);
        $response->setStatusCode(200);

        return $response;
    }