If the content on the server that you are going to retrieve is static then what is returned is rather obvious - response.xml contains XML and response.txt contains plain text. Where you are going to use a server side scripting language to generate the response then things are a little more complicated.
Whether the server returns XML or plain text depends on how the server side script is configured. How you configure the server side script depends on which language that it is that you are using on the server.
One language commonly used for the server side of AJAX is PHP. With PHP the content type is defined using the header function and the response is returned using echo.
header("Content-Type: text/xml");
// code to generate $response
echo $response;
?>