I very new to loading XML files into SQL Server 2008 and trying to understand what would be the best solution to do this. I have been presented with an CXML which is 4gigs and a XSD file. I have been able to load the XML file into a table with a XML column as shown below in the following script.
INSERT INTO Test_XML_Column
SELECT 10, xCol
FROM (SELECT *
FROM OPENROWSET (BULK 'G:\Data\TestData.xml', SINGLE_CLOB)
AS xCol) AS R(xCol)
What I am now trying to understand is how get the data elements out of the XML column, is there a way I can leverage the XSD file creating an assembily, creating another table to hold the XSD information or hard code the data elements to get into in SQL query to parse out the values and get into SQL tables.