
434 Chapter 9 • Using ADO.NET
making changes to the DataColumn and DataTable objects in our newly created
DataSet.These changes will be reflected when we write the data out.
It may not be obvious here, but by using the ReadXML method, we are not
connecting to the XML file as we would a database; we are importing the data.
This effectively means that we are copying the data, so if you need to persist your
changes, you also need to write out the XML file when you are finished with
the data.
Populating Programmatically
We can create a DataTable object and populate it manually.That is, we can con-
struct an empty DataTable, and then, using the DataTable methods ...