XML to Database in Winforms C# (or T-SQL)

I would like to know how to do the following...

The application is in Winforms, .NET 3.5 using C#.

There is an html location (not web service) that I can open and that returns multiple records in XML format (see attached).

How can I access this location from Winforms, loop through the records and store them in a defined database table where the table elements match the XML child nodes.

I am familiar on how to do it with Web Services and the WSDL class converter but have never programmed a situation like this.

If there is an alternative to do this directly in a SQL Server stored procedure, I would like to know how to do that.
<supplier>
<priority>5</priority>
<name>CROWN TOWERS</name>
-
<description>The luxurious Crown Towers sets the benchmark for luxury hotels in Australia.</description>
-
<thumbNailLarge>
/apps/ccn/ttc/supubthumbs/S/H/MEL/CRO/Deluxe_Room.jpg
</thumbNailLarge>
<thumbNail>/static/ttc/supub/S/images/H/MEL/CRO/thumb.jpg</thumbNail>
<address line1="8 Whiteman Street" line2="Southbank, VIC 3006" line3="AUSTRALIA"/>
<rating>5</rating>
<webPage>/apps/ccn/ttc/super/S/H/MEL/CRO.html </webPage>
<fromPrice>187.00</fromPrice>
<cityName>MELBOURNE      </cityName>
<consumerBookable>true</consumerBookable>
</supplier>

Open in new window

conrad2010Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alexandre SimõesManager / Technology SpecialistCommented:
To get the XML data use the method presented here:
http://www.west-wind.com/presentations/dotnetWebRequest/dotnetWebRequest.htm

After that I think the easiest way is to use the ReadXml method of the DataSet object.
The DataSet is able to create the schema as it reads the file so you don't have to spend much time with XML Readers.
http://support.microsoft.com/kb/311566

Cheers!
Alex
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.