how to load nested XML into data table in c# -
i want convert xml data data table.my xml file contains many nested tags.how can display data in data table using c#
<school> <staff> <staffname>raj</staffname> <staffname>rani</staffname> </staff> <students> <firstclass> <name>nani</name> <rollno>1</rollno> </firstclass> <secondclass> <name>rani</name> <rollno>1</rollno> </secondclass> </students> </school>
this sample file .now want display data in data table using c#.
can 1 me solve issue
you can use following code
dataset dstest = new dataset(); dstest.readxml(filepath, xmlreadmode.auto); datatable dt = dstest.tables[0];
Comments
Post a Comment