how to convert data base data to XML file

2019-05-29 19:55发布

Q:

I'm a beginner to the XML.I have some data comes from my database, and i wanna to convert these data to XML file,to import it to a specific program later..What are the required steps to do this?Please examples and articles if possible?

need some thing like that ,but dynamically.

2条回答
贼婆χ
2楼-- · 2019-05-29 20:01

GetXml() is the function with DataSet to get xml.

DataSet ds = new DataSet();
 // fill dataset from database
ds.GetXml();

Hope will Help.

查看更多
Evening l夕情丶
3楼-- · 2019-05-29 20:01
DataSet ds = new DataSet();
ds.Tables.Add("DataTableName");
ds.GetXml();
查看更多
登录 后发表回答