I would recommend putting this in your Controller's action instead of setting the header value using PHP in your layout:
$this->RequestHandler->respondAs('xml');
It's the real 'Cake' way of doing it, and should solve your problem (which is probably whitespace or something being output before the header).
Of course, you need to be using the RequestHandler
component, so put this in the controller if you don't already have it:
var $components = array('RequestHandler');