Code for reading an XML file into a DataTable

前端 未结 1 1246
情深已故
情深已故 2021-01-14 00:50

I have written the following piece of code that reads through a given xml-file and writes the contents into a data-table. Please do NOT suggest to use LinqToXml as that opti

相关标签:
1条回答
  • 2021-01-14 01:29

    You can use ReadXML

            DataSet ds = new DataSet();
            ds.ReadXml(fileNameWithAbsolutePath);
            return ds.Tables[0];
    
    0 讨论(0)
提交回复
热议问题