This is a discussion on Read XML by Dataset within the ASP and ASP.NET Programming forums, part of the Web Development category; Hi, Here we have to read the XML by using Dataset, DataSet dataSet = new DataSet(); DataTable dataTable = new DataTable(); dataSet....
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, Here we have to read the XML by using Dataset, DataSet dataSet = new DataSet(); DataTable dataTable = new DataTable(); dataSet.ReadXml(@"D:\XML\file.xml"); dataTable = dataSet.Tables["ITEMS"]; for (int i = 0; i < dataTable.Rows.Count; i++) { int noOfFields = dataTable.Rows[i].ItemArray.Length; if (dataTable.Rows[i].ItemArray[noOfFields-7] + "" != "") { headerTab = dataTable.Rows[i].ItemArray[noOfFields - 6] + ""; subHeaderTab = dataTable.Rows[i].ItemArray[noOfFields - 5] + ""; break; } } This is only applicable for the structured XML.
__________________ "GP_Logesh..." |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can we sort the values in dataset? | mobilegeek | C# Programming | 4 | 04-18-2008 04:39 AM |
| how to update dataset to sql server? | smani | ASP and ASP.NET Programming | 1 | 09-06-2007 07:29 AM |
| Can anybody explain about the differences between dataset.clone and dataset.copy? | kingmaker | C# Programming | 2 | 08-28-2007 12:22 AM |
| Inconsistent accessibility error in the dataset | Sathish Kumar | C# Programming | 1 | 08-22-2007 01:13 AM |
| Difference between ADO.NET dataset and ADO Record set? | prasath | ASP and ASP.NET Programming | 1 | 07-18-2007 08:06 AM |