If I understand the original post correctly then you just want to set the Content-type header to text/xml

Then print out your xml with nothing else.

Hope that helps...