Using XML in SQL Server 2005
In this tutorial you will learn about using XML in SQL Server 2005 - XML enhancements in SQL Server 2005, the FOR Clause, Using XSINIL with ELEMENTS, Using elementsxinil in EXPLICIT mode and Enhancements to OpenXML function
XML enhancements in SQL Server 2005
Microsoft SQL Server 2000 introduced XML capabilities to the server in a very limited manner. Developers could export relational data as XML and shred the same back into XML. However, such data could not be stored in the database, except as large string values—the data of which could not be manipulated without string manipulation functions.
Microsoft SQL Server 2005 introduces the XML data type into the database engine. This can be queried, indexed and manipulated like any other data type. The user has a choice of storing the data as XML data type or in columns for frequent manipulation. If the data is stored in columns, the developer has to ensure that the data can be converted into XML and sent or received as such and reconverted for storage. However, this becomes essential only if the data is frequently manipulated and also sent and received across the network. If the data is not frequently manipulated, it makes sense to store it as XML data type in the database, as XML data type also provides for query on data, access to individual data and check for existence of data etc.
Two major enhancements were made to the XML features that existed in SQL Server 2000 to enable the transformation of relational data to and from XML as needed. The first of these is the FOR clause and the second is the OPENXML clause.
Read
More...
http://www.exforsys.com/content/view/1734/356/