I can find lots of example on how to import certain types of XML data into SQL Server 2005. But I've been given data in the following format (repeating "row" and "cell" with ID's instead of the tags been named etc:
<?xml version="1.0"?> <rows>
<row id='1'>
<cell id='category'>Simple</cell>
<cell id='query'>summary</cell>
<cell id='clientsfound'>6</cell>
<cell id='eligibleclients'>11</cell>
<cell id='percentage'>55</cell>
<cell id='days'>0</cell>
</row>
<row id='2'>
<cell id='category'>Complex</cell>
<cell id='query'>details</cell>
<cell id='clientsfound'>4</cell>
<cell id='eligibleclients'>6</cell>
<cell id='percentage'>67</cell>
<cell id='days'>5</cell>
</row>
...
</rows>
Ideally I want to load it into a table such as:
CREATE TABLE [dbo].[QueryResults](
[UserString] [varchar](50) NULL,
[ImportStamp] [timestamp] NULL,
[RowID] [int] NULL,
[Category] [nchar](10) NULL,
[Query] [nchar](10) NULL,
[ClientsFound] [int] NULL,
[EligibleClients] [int] NULL,
[Percentage] [int] NULL,
[Days] [int] NULL
)
Can someone provide me with an example or point to towards a online tutorial?