Forum Moderators: open

Message Too Old, No Replies

XML to a SQL TAble

Convert an XML data to MS SQL Data

         

wsrinivas

9:50 am on Aug 11, 2006 (gmt 0)

10+ Year Member



HI

I wish to convert
< some XML >
data to an SQL Table

Any Ideas, I need to conver this on a regular basis as the cities might change.

Regards
Sri

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 12:06 am (utc) on Aug. 12, 2006]

sun818

6:20 pm on Aug 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The latest version of Microsoft Access has the ability to import XML files. Or even Microsoft Excel. You might try linking the XML file into Access so you don't have to re-import each time. From there, you can push the data into MS SQL Server.

esaslo

8:14 pm on Aug 22, 2006 (gmt 0)

10+ Year Member



If the data is in the same format all of the time, you might just write a schema to do it, and create a stored procedure or an executable to keep it updated.

I was faced with a similar issue; I created something to download the tables, truncate the current tables in the database, and then--via a schema--execute and refresh the sql data.

If you need some coding direction, I can provide some sheets, upon request.

ronburk

12:53 am on Sep 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use XSLT to transform the data into a CSV file, a series of SQL insert statements, or most anything else your SQL database software prefers for import. Free XSLT processors are widely available for just about any platform (e.g., Google "xsltproc").