I'm not exactly expert at CLR, but I've bumbled my way through writing a text file using VB.NET's file operations just by digging through Bing searches on the subject. It's not that hard to do. I can't remember how I did it (was 3 years ago), but I remember it not being particularly difficult. Writing an XML file should be easy enough, unless you have oddball requirements.
Have you thought about simply having SSIS export the file instead? That'll be even easier.
Totally untested, I'm not at my desk any more.
public class XMLWriter
public static SqlString ReplaceMatch(
// input parameters must not be NULL
if (!inputXMLString.IsNull &&
System.IO.StreamWriter file = new System.IO.StreamWriter(outputFileDIR);
// if any input paramater is NULL, return NULL
// on any error, return NULL
return new SqlString();
will give it a try thx buddy