XML Integration of Relational Data
The Microsoft® SQL Server™ 2000 relational database engine natively supports Extensible Markup Language (XML).
You can now access SQL Server 2000 over HTTP using a Universal Resource Locator (URL). You can define a virtual root on a Microsoft Internet Information Services (IIS) server, which gives you HTTP access to the data and XML functionality of SQL Server 2000.
You can use HTTP, ADO, or OLE DB to work with the XML functionality of SQL Server 2000:
- You can define XML views of SQL Server 2000 databases by annotating XML-Data Reduced (XDR) schemas to map the tables, views, and columns that are associated with the elements and attributes of the schema. The XML views can then be referenced in XPath queries, which retrieve results from the database and return them as XML documents.
- The results of SELECT statements can be returned as XML documents. The SQL Server 2000 Transact-SQL SELECT statement supports a FOR XML clause that specifies that the statement results be returned in the form of an XML document instead of a relational result set. Complex queries, or queries that you want to make secure, can be stored as templates in an IIS virtual root, and executed by referencing the template name.
- You can expose the data from an XML document as a relational rowset using the new OPENXML rowset function. OPENXML can be used everywhere a rowset function can be used in a Transact-SQL statement, such as in place of a table or view reference in a FROM clause. This allows you to use the data in XML documents to insert, update, or delete data in the tables of the database, including modifying multiple rows in multiple tables in a single operation.