Well you will need to make sure that the IIS account has permission to read/write to the relevant folder. Then you will need to do the following (pseudo code):
Code:
Instantiate msxml2.domdocument.4.0
Create xml from raw data
Use save method of DomDocument
You can then send a page to the user and to show the raw data have an iframe in the page with its source as the file you just created.
Plenty of examples if you download the ms xml 4 core services sdk from
http://msdn.com/xml.
--
Joe (Co-author Beginning XML, 3rd edition)