Whatever the means for setting the dataset's schema, when it comes time to load XML into the dataset the following rules are used:
1) Elements with a certain name are mapped into the dataset of the same table name.
2) Attributes and scalar-valued sub-elements are mapped into columns of that table.
3) The schema of the table is expanded as appropriate if the columns are not already in the dataset or if the dataset does not already contain a table by the same name.
When loading an XML schema into the dataset, a table is created for each complex type in the schema, and containment is expressed using primary/foreign key relationships. The key columns are automatically inserted into the schema, and a Data relation is added for each pair of related tables.
Therefore, when loading data that resides in multiple tables from SQL server or any other database that supports XML, it is in some ways more expedient to use the XML loading facilities rather than the DataSet command. The former enables loading all the data in one step, whereas the latter requires a dataset command per table, and also involves setting up the relationships between the tables manually.