Systems Engineering and RDBMS

More on the nodes() method

Posted by decipherinfosys on October 13, 2008

We have written before about using the nodes() method in order to de-construct XML as relational data. Yesterday, while working at a client issue we got a XML file which had a combination of attribute and element centric XML in it. There are many ways to de-construct such a file – we, once again, used the nodes() method to break it up.

You can access the code here. If you see the code, we started from the deepest end and worked our way upwards. In addition, we used the cross apply in order to get the data for the node which did not have the node that we had used for the deepest level. There are a couple of other ways also to do this and we will post the different permutations in an upcoming whitepaper on XML usage in SQL Server 2005 and 2008.

One Response to “More on the nodes() method”

  1. […] reading and writing XML data in SQL Server in several of our blog posts – one such example is this post. One of the recent questions that was posed was about de-constructing the data stored in an XML […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: