Search This Blog

SQL server 2008 xml Data Type - New feature

Prior to SQL Server 2005, SQL Server provided extremely limited support for storing, managing, and manipulating XML data. SQL Server 2000 implemented its XML capabilities through implementation of the FOR XML clause and kludgy LOB data type operations combined with
specialized system-stored procedures. SQL Server 2005 introduced the xml data type, promoting XML data storage and manipulations to first-class status in SQL Server.

The xml data type remains one of the most important XML-specific features in SQL Server 2008. The xml data type supports the storage of typed XML documents and fragments that have been validated against an XML schema collection and untyped XML data which has not. The
xml data type can be used to declare columns in a table, T-SQL variables, parameters, and as the return type of a function. Data can also be cast to and from the xml data type. In addition, the xml data type brings with it a set of methods useful for querying, shredding, and manipulating XML data.