The next code display a dataset in an xml format. Could some one provide a technique to create an xml file out of this.
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace XMLBond_Hub
{
class Program
{
static void Main()
{
SqlConnection connString = new SqlConnection("Server=test1;UID=usuario;PWD=pass;Database=xxx");
SqlDataAdapter objDA = new SqlDataAdapter("select First_Name,Last_Name,Email,Company_Name from contact ", connString);
DataSet ds = new DataSet();
objDA.Fill(ds);
string xml = ds.GetXml();
}
}
}
Thanks
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace XMLBond_Hub
{
class Program
{
static void Main()
{
SqlConnection connString = new SqlConnection("Server=test1;UID=usuario;PWD=pass;Database=xxx");
SqlDataAdapter objDA = new SqlDataAdapter("select First_Name,Last_Name,Email,Company_Name from contact ", connString);
DataSet ds = new DataSet();
objDA.Fill(ds);
string xml = ds.GetXml();
}
}
}
Thanks