How to import XML file into SQL server
I have a XML file of an Apartment data. I need to import this file into SQL server Database.
The xml file looks like the following:
<Apartment>
<ApartmentName>LINCOLN PROPERTY COMPANY</ApartmentName>
<ApartmentPrice>799</ApartmentPrice>
<Address>
<Address1>8203 Southwestern Blvd.</Address1>
<Address2></Address2>
<City>Dallas</City>
<State>TX</State>
<Zip>75206</Zip>
<PO_Box></PO_Box>
</Address>
</Apartment>
I use ADO.Net to read the XML data into Dataset, then update to SQL Server. After I load the the dataset, I found out the dataset has two tables, One is Address table, and the other one is apartment table with two fileds ApartmentName and ApartmentPrice. However, in the SQL server database, we need to have all the address , name and price information in one table.
Except for modifying DataSet in the code to merge these two tables together column by column, is there any other easy ways to merge two tables together. It seems like Dataset has merge method while datatable does not have it.
Thanks very much.

