O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using DataSet to modify custom XML configuration files

DataSet is the most versatile component of ADO.NET as it can load data from not only database objects but also XML, Excel worksheets, and so on. Its ability to load data from XML documents is really helpful if you want to keep configuration data such as Web Service host address and locale-based messages. In this recipe, we will make use of DataSet to load the configuration details from the XML document, modify the data, and save it back into the XML document.

We will also use DataGridView to display the loaded data and provide a UI to the user for modifying and saving the data. In this recipe you will also see how well DataGridView plays with DataSet.

How to do it...

  1. Launch Visual Studio 2012. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required