Link to home
Start Free TrialLog in
Avatar of jschultz0614
jschultz0614Flag for United States of America

asked on

how to import xml from a website, parse it and save the results into mssql 2k8 r2

OK...

I have an external XML web site (http://rss.timegenie.com/forex2.xml) that I need to import into MSSQL Server 2008 R2.

1. is this even possible?

2. how would this be done?

Thanks,
John
Avatar of jschultz0614
jschultz0614
Flag of United States of America image

ASKER

I tried the example found at https://www.experts-exchange.com/questions/26631018/Bulk-sql-upload-of-XML.html with no luck, it only returns an empty rowset.
Avatar of Aaron Tomosky
Here are some good examples
http://stackoverflow.com/questions/3628846/insert-xml-into-sql-server-2008-database

Get the insert working outside of your site, them get a simple insert working, and only then put it all together. Too many things can be a problem when doing it all at once.
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
getting the following error:
Msg 4860, Level 16, State 1, Line 51
Cannot bulk load. The file "c:\ee\forex2.xml" does not exist.

I created the ee directory. The script works only if I manually download the xml file myself.
Disregard :), forgot to create the js script :D.

AWESOME SCRIPT btw.
Awesome Script
Thanks, I have been using it for a while now, and (so far) it stands the test of time...

Cheers,
Mark