[WebMethod]
public XmlDocument MydataProvided()
{
Dataset DS = new DataSet ()
// here you should write some login to fill the dataset
return GetDSXml(DS);
}
public XmlDocument GetDSXml(Dataset ds)
{
System.IO.StringWriter sw = new System.IO.StringWriter();
ds.WriteXml(sw);
sw.Close();
XmlDocument xd = new XmlDocument
xd.LoadXml(sw.ToString());
return xd;
}
public XmlDocument GetDtXml(DataTable dt)
{
System.IO.StringWriter sw = new System.IO.StringWriter();
dt.WriteXml(sw);
sw.Close();
XmlDocument xd = new XmlDocument
xd.LoadXml(sw.ToString());
return xd;
}
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)