how to convert data base data to XML file

六眼飞鱼酱① 提交于 2020-01-02 14:05:14

问题


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.


回答1:


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

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

Hope will Help.




回答2:


DataSet ds = new DataSet();
ds.Tables.Add("DataTableName");
ds.GetXml();


来源:https://stackoverflow.com/questions/6328010/how-to-convert-data-base-data-to-xml-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!