Using SQL Server 2005’s XML Features

All databases support XML, sort of. You can generally store XML data in a text-based field, but that’s nominal support at best.

SQL Server 2005 provides rich server-side XML features and we’ll cover these features in the "SQL Server 2005’s XML Type" section later in the chapter. But first, let’s briefly review the XML features available in SQL Server 2000.

SQL Server 2000 added the ability to take data stored in typical relational columns and return the data as a stream of XML through SELECT ... FOR XML queries. However, SQL Server 2000 did not provide truly rich server-side XML features. For example, there was no way to say that a column had to contain XML, let alone XML that conformed to a particular schema. ...

Get Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.