Xml files can be loaded into a GridView control in asp.net. To load xml files, it can be usually binded to the GridView by creating the xml data source and then setting the data source property of the GridView. However, if xml files contains nodes, then it does not work and instead produces error -
The data source for GridView with id 'GridView1' did not have any properties or attributes from which to generate columns. Ensure that your data source has content.
To bind the xml file with nodes, it's easier to create a dataset and then to bind it to the gridview from code behind. Here is an example of how that would work.