Database Engine XML Enhancements
The Microsoft SQL Server 2005 Database Engine now supports an xml data type for storing XML documents in table columns or Transact-SQL variables. It also supports the XQuery language, including the XML Data Manipulation Language (XML DML).
New xml Data Type
The new xml data type supports the storage of XML documents and fragments. The xml data type can be used in columns, variables, or stored procedure and function parameters. XML instances stored using the xml data type can be associated with an XML schema (XSD) that validates and types the instance.
For more information, see xml Data Type.
XQuery is a language for querying XML data stored using the xml data type. The SQL Server 2005 implementation of XQuery is based on working drafts of the World Wide Web Consortium (W3C) XQuery language definitions.
For more information, see XQuery Against the xml Data Type.
XML Data Manipulation Language (XML DML)
The current W3C definition of XQuery does not include the ability to modify XML documents. Microsoft has extended the XQuery implementation in SQL Server 2005 to include the ability to insert, update, and delete XML documents or fragments.
For more information, see XML Data Modification Language (XML DML).
Transact-SQL Enhancements: FOR XML Enhancements
You can nest FOR XML statements to create a hierarchy of XML documents. The results of a FOR XML statement can be stored in a column, stored procedure parameter, or variable defined using the new xml data type.
For more information, see New FOR XML Features.
Indexes on xml Type Columns
The XML documents and fragments stored using the xml data type can be very large. If they are not indexed, the Database Engine must shred the documents and fragments for each reference. Defining an index on a column using the xml data type allows the Database Engine to more efficiently process the documents and fragments.
For more information, see Indexes on xml Data Type Columns.
Native XML Web Services in SQL Server 2005
Instances of the Database Engine can be configured with HTTP endpoints or addresses to which SOAP requests can be sent from applications. The packets are received directly by the instance of the Database Engine without the need for configuring any middle-tier service such as a Microsoft Internet Information Services (IIS) server. The results of queries sent to an HTTP endpoint are returned as an XML document.
For more information, see Using Native XML Web Services in SQL Server 2005.