C'est résumé dans un excellent livre blanc que vous trouverez ici : http://www.microsoft.com/sqlserver/2008/en/us/wp-sql-2008-whats-new-xml.aspx
En voici le résumé :
The Evolution of SQL Server XML Capabilities
XML Functionality in SQL Server 2000
XML Functionality in SQL Server 2005
XML Functionality in SQL Server 2008
XML Schema Validation Enhancements
Lax Validation Support
Full xs:datetime Support
Union and List Types
support for the let clause
SELECT @x.query( '<Orders> { for $invoice in /Invoices/Invoice let $count :=count($invoice/Items/Item) order by $count return <Order> {$invoice/Customer} <ItemCount>{$count}</ItemCount> </Order> } </Orders>')
SELECT @x.query( '<Orders> {
for $invoice in /Invoices/Invoice
let $count :=count($invoice/Items/Item)
order by $count
return
<Order> {$invoice/Customer}
<ItemCount>{$count}</ItemCount>
</Order>
}
</Orders>')
XML DML Enhancements
support the XML DML expressions insert
DECLARE @newBike xml SET @newBike = '<Bike>Racing Bike</Bike>' SET @productList.modify ('insert sql:variable("@newBike") as last into (/Products)[1]')
DECLARE @newBike xml
SET @newBike = '<Bike>Racing Bike</Bike>'
SET @productList.modify
('insert sql:variable("@newBike") as last into (/Products)[1]')