I have an interface in a Web service that returns XML output. The output is queried from a MS SQL database by caling stored procedure. While the stored proc itself is not returning XML, and I don't have any control over it, I need to return the result set as XML.
Right now, I'm using XmlWriter.
StringBuilder sbLog = new StringBuilder();
XmlWriter writer = XmlWriter.Create(sbLog);
//and so on
Is there an easier, elegant way to do this?