Import XML into Dataset C#

后端 未结 5 838
北海茫月
北海茫月 2020-12-06 03:13

I am trying to get a xml file into a dataset and am using the following code:

DataSet ds = new DataSet(\"TestDataSet\");
ds.ReadXml(FileName);
5条回答
  •  無奈伤痛
    2020-12-06 03:43

    In order for the ReadXml to function properly in this case, I think you need to specify a Schema in your XML file. Otherwise, the reader will not know what to do with the datatypes.

提交回复
热议问题