Microsoft SQLXML 4.0 supports features that allow you to write applications to access XML data from an instance of SQL Server, bring the data into the Microsoft .NET Framework environment, process the data, and send the updates back to SQL Server.
Microsoft SQLXML Managed Classes exposes the functionality of SQLXML 4.0 inside the Microsoft .NET Framework. With SQLXML Managed Classes, you can write a C# application to access XML data from an instance of SQL Server, bring the data into the .NET Framework environment, process the data, and send the updates back to SQL Server as a DiffGram to apply the updates. You must use a mapping schema when applying updates to a SQL Server database using SQLXML Managed Classes. For a working sample, see Accessing SQLXML Functionality in the .NET Environment.
To use the SQLXML Managed Classes with SQLXML 4.0, you must install Microsoft Visual Studio.
The .NET Framework includes the SQL Server .NET Data Provider. This provider can be used to access SQL Server from the .NET environment; however, it can handle only traditional SQL queries (that is, relational database queries with the exception of FOR XML queries). You cannot execute XML templates or the server-side XPath queries in SQL Server.
For information about accessing and modifying data in SQL Server within the Microsoft .NET Framework, and about using DiffGrams to update data in SQL Server tables, see Accessing SQLXML Functionality in the .NET Environment.
You can also write Microsoft Visual Studio applications to bulk load XML documents by using XML Bulk Load. For more information, see Performing Bulk Load of XML Data (SQLXML 4.0). You must add a reference to the XML Bulk Load DLL (Xblkld4.dll) in your application. This is a COM DLL for which Visual Studio .NET automatically creates the wrapper library.
This section provides sample applications that demonstrate how to use the Microsoft SQLXML Managed Classes:
Executing SQL Queries (SQLXML Managed Classes)
Executing SQL Queries by Using the ExecuteXMLReader Method
Processing XML on the Client Side (SQLXML Managed Classes)
Executing XPath Queries (SQLXML Managed Classes)
Executing XPath Queries with Namespaces (SQLXML Managed Classes)
Executing Template Files by Using the CommandText Property
Executing Template Files by Using the CommandStream Property
Applying an XSL Transformation (SQLXML Managed Classes)