You may want a webpage within your web application that writes the data in XML format :
Create a new WebForm
In the Load event put the following code :
string responseXml = CreateXmlFromDatabase();
Response.ContentType = "text/xml";
Response.Write(responseXml);
Response.End();
And ofcourse create a function
CreateXmlFromDatabase()
which returns the data you want to pass as a string :
private string CreateXmlFromDatabase()
{
StringBuilder sbXml = new StringBuilder("");
sbXml.Append("<mydata>");
sbXml.Append("</mydata>");
}