sql server 2008 - import data into existing tables from XML files

bambu

New Member
Before data is removed from an sql server database, it is exported and saved as an XML file in the event that this data is to be recovered at a later stage. I am now trying to get the data back into the database from an XML file but cannot find the best way to do this. The SQL server import / export wizard does not appear to support XML. I have looked at the XML Bulk Load component but this doesn't look like it would work for my issue. Has anyone any suggestions?The XML may look like below and I woud want each row inserting:\[code\]<?xml version="1.0" encoding="UTF-8"?><products><product><prod_id>4235823</prod_id><productImageURL>image1.jpg</productImageURL><entryDate>Aug 30 2011 01:47:08:317PM</entryDate><category>859191</category><productDescription>product description 1</productDescription><productName>product name 1</productName><Price>9.99</Price></product><product><prod_id>8989595</prod_id><productImageURL>image2.jpg</productImageURL><entryDate>Aug 30 2011 01:47:08:317PM</entryDate><category>859191</category><productDescription>product description 2</productDescription><productName>product name 2</productName><Price>2.99</Price></product><product><prod_id>4575454</prod_id><productImageURL>image3.jpg</productImageURL><entryDate>Aug 30 2011 01:47:08:317PM</entryDate><category>859191</category><productDescription>product description 3</productDescription><productName>product name 3</productName><Price>5.99</Price></product></products>\[/code\]
 
Top