As @raul338 mentioned, you might want to look at using routing file extensions. When combined RequestHandler, you should end up having Templates/Sitemaps/xml/sitemap.ctp
rendered (assuming your controller is Sitemaps
. Inside that ctp you can build out your XML.