May 12, 2006 at 2:37 am
Hello,
Anybody has an idea of how to import an XML file that is located on the web?
I have a URL that like: http://www.somthing.com/temp.xml
I want to store this XML file into an XML column of a table, something like:
INSERT INTO xml_documents ( x )
SELECT * FROM OPENROWSET(BULK N'http://www.somthing.com/temp.xml', SINGLE_BLOB) AS x
Any ideas??
Thanks Erik
May 12, 2006 at 5:47 am
Check out OPENXML in Books Online, and the related topics. There's actually quite a bit of useful info in there about how to import XML files.
May 12, 2006 at 6:46 am
Hello Marshall,
I already took alook at this, but it all seemed to work for local XML files. I want to do it for an XML file that is located on the web (URL). I can't find nothing there. Probably it's me, I also never can find my keys....
Erik
May 12, 2006 at 7:24 am
Try the link below for code sample to get started. Hope this helps.
http://msdn.microsoft.com/msdnmag/issues/05/06/DataPoints/default.aspx
Kind regards,
Gift Peddie
Kind regards,
Gift Peddie
May 12, 2006 at 7:29 am
Hi Gift, Thanks again, but also there was not what I was looking for. I finally found the solution in the following site:
http://blogs.msdn.com/jgalla/archive/2005/09/13/464881.aspx
This creates an ASSEMBLY that retrieves a XML document by using T-SQL.
Now I can call:
SELECT dbo.fn_GetXmlDocument('http://www.somewebsite.com/file.xml')
And I can store it in an xml column of the table. Thanks for helping anyway!
Erik
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply