Recap of What Was Discussed in This Chapter


  • There is quite a long list of limitations associated with the FOR XML extension. As a general rule, FOR XML can only be used in statements that produce direct output to the end user 's presentation device (browser).

  • The RAW mode of FOR XML is just that; it presents every row of a database query result with the simplistic identifier <ROW> . All columns of the result set's row are returned as attributes of the row.

  • In previous chapters where we've generated XML documents, our dealings with the FOR XML extension have been related to AUTO mode. XML AUTO mode returns results in documents with nested elements, and strict rules are followed to accomplish this.

  • This mode does exactly what its name leads you to believe. EXPLICIT mode allows you to explicitly specify exactly how you want the element nesting to appear in the XML output document. It requires the rowset that's returned from a query to be in a special format. This format is called the Univesal table, and it is used to produce the output document. One requirement on the rowset result is that it must be ordered so that its children follow the parent element immediately. Also, it must associate the element names with the tag numbers and provide attribute names (the default) as the column names of the Universal table.

  • The OPENXML extension, which we'll discuss in detail in Chapter 8, allows record insertion into a database from an XML document. Any data from that document that does not have a related column for storage can be stored in a column within that database known as the unconsumed data column. XDR schemas have the annotation sql:overflow-field , which identifies this column.



XML and SQL Server 2000
XML and SQL Server 2000
ISBN: 0735711127
EAN: 2147483647
Year: 2005
Pages: 104
Authors: John Griffin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net