December 2002
Intermediate to advanced
1560 pages
40h 44m
English
An important feature of SQL Server 2000 is the ability to retrieve XML-formatted metadata that defines the content model (what elements will be present, their nesting structure, and what types of data they contain) of an XML document.
This metadata comes in the form of a well-formed XML document known as an XML-Data schema. It can be returned in queries that use any of the three FOR XML modes, and to get it, you specify the XMLDATA option, as exemplified in Listing 41.6.
SELECT TOP 2 OrderID, OrderDate, CustomerID FROM Orders FOR XML AUTO, XMLDATA go <Schema name="Schema1" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes"> ... |
Read now
Unlock full access