使用数据集和XML

.NET环境中,XML是数据交换的基本格式,In fact ,The xml is the base of the ADO.NET,The DataSet store the data with the Xml inside it,and has many methods  to write and read the xml

For example:

1.System.Data.DataSet的ReadXmlSchema()和WriteXmlSchema(),可以把数据集的结构导出导入为XML模式!

2.可以使用ReadXml()和WriteXml()读取数据集中的数据并且转换为Xml格式!与另一程序交换数据或者制作数据集的本地副本时很有效 !

3.可以把数据集绑定到xml文档上(System.Xml.XmlDocument的实例!),数据集和数据文档是同步的!可以使用ADO.NET 和XML操作来修改它!

Code

原文地址:https://www.cnblogs.com/binlyzhuo/p/1339429.html