Microsoft's SQLXML 3.0 is a powerful tool for rendering SQL Server 2000 relational data as structured XML documents within SOAP 1.1 response-message payloads. My earlier articles about SQLXML 3.0 emphasize generating document/literal XML Web services from existing stored procedures or table-returning functions (see Additional Resources). These articles also explain how to set up SQLXML 3.0 SOAP virtual directories and test SQLXML Web services with .NET WebService Studio. In this article, I'll show you how to write Transact-SQL (T-SQL) code to return complex XML business documents that conform to a predetermined hierarchical design or XML schema. The examples use the sample Northwind SQL Server 2000 or NorthwindCS MSDE 2000 database, but the design principles apply to most common business documents, such as sales orders, invoices, requisitions, purchase orders, and medical reports.
|