As mentioned in the preceding section, DataSets are represented internally by XML. Therefore, it is particularly easy to transfer a DataSet to an XML document and also to reverse the process.
The example in Listing 10.3 uses the GetXml() method of the DataSet object to return the DataSet's contents in XML form as a string. First, a table of information is retrieved from the Customers table in the Northwind database. Then it is placed into a label Web control in a Web form in order to display it.
<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %> <HTML> <HEAD> <script language="VB" runat="server" > Sub ...