Appendix G. Selected T-SQL and .NET Code Listings

With this book, I've introduced a wide variety of sample code listings. My intent with this Appendix is to reproduce some of the code listings that introduce key concepts, with additional documentation.

Chapter 1 included sample listings of data in various formats, including XML, for comparison purposes. Listing 1-3 introduced a simple hierarchical XML structure for the high-grossing movie listing. This listing introduced several XML node types including elements, attributes, processing instructions, comments, and text nodes.

Example 1-3. Modified Sample XML

<?xml version = "1.0" encoding = "UTF-16"?>
<!-- High-grossing movie listing -->
<movies>
    <film>
        <?style superhero?>
        <name>Spider-Man ...

Get Pro SQL Server 2008 XML now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.