Data needs to be moved from the data source to the DataSet and from there to various components. In ADO.NET, the format for transferring data is XML. Similarly, if data needs to be persisted (for example, into a file), it is stored as XML. If you have an XML file, you can use it like any data source and create a DataSet out of it.
In ADO.NET, XML is a fundamental format for data. The ADO.NET data API's automatically creates XML files from information in the DataSet and sends them to another component. The second component can invoke similar API's to read the XML back into a DataSet. Basing data protocols around XML offers a number of advantages as we have already seen. For most scenarios, we do not need to know XML in order to use data in ADO.NET. ADO.NET automatically converts data into and out of XML as needed; you interact with the data using ordinary programming methods. |