| Side-by-side Support |
Installing SQLXML 3.0 will not remove the DLLs that were installed by either SQLXML 1.0 or SQLXML 2.0, so each version can be run independently. I recommend that your SQL virtual directories be upgraded to the latest version. Both versions 2 and 3 provide a property tab for this purpose. (For more information, see the IIS Virtual Directory Management topic in the SQL Server documentation.) The MMC snap-in for the SQL Server Virtual Directory Management utility contains a properties dialog box with an additional tab for version 3.0; this tab lets you upgrade any virtual directories to SQLXML 3.0. The tab will disappear after you upgrade the virtual directory. It is recommended that you use the version-dependent progids for all components of these releases.
Evolution of XML Support
You have many options for accessing XML-formatted data from SQL Server. When SQL Server 2000 was introduced, a number of XML features shipped with the product. URI XML access via HTTP was added. This enabled you to get XML results from a browser. The FOR XML clause, which allows you to query XML and build XML-based file templates with SELECT statements that return XML, was added. The OPENXML resultset provider was introduced to save XML records to SQL Server, allowing you to build stored procedures that treat XML content as a rowset just as you would use a TABLE object in T/SQL. An update was made to the SQL Server 2000 OLE DB provider that allows you to use XML documents as your SQL command text. It also now streams resultsets. Also added was the ability to query data using XPath against predefined XML mapping schemas using the XML-Data Reduced (XDR) format, allowing you to use XPath instead of SQL commands against a data source, for example. Only the XDR format was supported at the time; true XML Schemas (XSD) came later.
Downloadable add-ons were released shortly after SQL Server 2000 was released. Two of these add-ons came within a year of each other and were referred to as Web releases (SQLXML 1.0 and SQLXML 2.0). They contained the latest of the XML features for SQL Server 2000.
In SQLXML 1.0 (Web release 1, spring 2001), the following changes were made to support XML:
SQLXML 2.0 (Web release 2, fall 2001) included the following changes:
- Updategrams were added to allow you to update and insert data into SQL Server, allowing you to use XML templates to insert/update SQL Server in transactional fashion similar to today's .NET DataSet DiffGrams.
- The ability to use XML to bulk-load large XML documents into SQL Server 2000 for tasks such as updating large batch-oriented data made batch updates easier.
- Updates to the XDR schemas and changes to the XPath behavior against those schemas were included to improve performance.
- Support for generated GUIDs using an Updategram was included.
- Support for XML views using annotated XSD schemas was added. Support for XDR was still there, but the support for the W3C recommended XSD format was new.
- Also added was support for client-side XML formatting allowing for real three-tier-style processing options. XML was no longer just formatted on the server.
- Support for the SQLXMLOLEDB provider, one of two new data-access components, was included. This OLE DB provider supports both client-side and server-side XML formatting against any rowset returned from SQL Server using XPath or SQL. Unlike the previous ADO support for XML, this provider supports XSD schemas, not the old proprietary format.
- SQLXML managed classes, the second of the two new data-access components, were introduced. Managed classes use the Microsoft .NET Framework class libraries to provide you with .NET Framework classes for sending and receiving XML data to and from SQL Server. A .NET application can now be written to access XML data from an instance of SQL Server as well as to update or insert data. With the SQLXML managed classes, you can now exploit all of SQLXML completely from .NET. This includes invoking XPath queries as well as any XML templates such as the one I discussed in this article.
- The DiffGram format was introduced through the DataSet class of the .NET Framework object model. It can also be used from the SQLXML managed classes.
- Web Services support in Microsoft SQLXML 3.0 allows you to directly expose SQL Server 2000 data through a Web Service. SOAP HTTP requests were now sent directly using SQLXML to execute any SQL Server stored procedure, user-defined function (UDF), or XML template.
- The initial release of SQL Server 2000 introduced server-side OPENXML functionality. OPENXML provided a rowset view of XML data. Now this same functionality was provided at the client level in the form of the XMLOLEDB provider. XML was formatted on the client to provide a rowset view of the data like you get when using a TABLE object in T/SQL. This is similar to using the SQLXML 2.0 SQLXMLOLEDB provider, but there were subtle differences.
- DiffGram format enhancements were made. SQLXML 3.0 supports a new annotation called ParentId. This annotation establishes a parent-child relationship among the different elements of a DiffGram. SQLXML then uses this information to update the data source in SQL Server.