17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Contents<br />

Chapter 16: A Brief XML Primer 473<br />

XML Basics 474<br />

Parts of an XML Document 475<br />

The Document 475<br />

Declaration 476<br />

Elements 477<br />

Nodes 478<br />

Attributes 479<br />

No Defects — Being Well Formed 479<br />

An XML Example 480<br />

Determining Elements vs. Attributes 483<br />

Namespaces 484<br />

Element Content 485<br />

Being Valid vs. Being Well Formed — Schemas and DTDs 486<br />

What <strong>SQL</strong> Ser ver Brings to the P arty 486<br />

Defining a Column as Being of XML Type 487<br />

XML Schema Collections 488<br />

Creating, Altering, and Dropping XML Schema Collections 490<br />

CREATE XML SCHEMA COLLECTION 490<br />

ALTER XML SCHEMA COLLECTION 491<br />

DROP XML SCHEMA COLLECTION 491<br />

XML Data Type Methods 492<br />

.query (<strong>SQL</strong> <strong>Server</strong>’s Implementation of XQuery) 492<br />

.value 493<br />

.modify 494<br />

.nodes 495<br />

.exist 497<br />

Enforcing Constraints Beyond the Schema Collection 498<br />

Retrieving Relational Data in XML Format 498<br />

The FOR XML Clause 498<br />

RAW 500<br />

AUTO 502<br />

EXPLICIT 503<br />

PATH 504<br />

PATH 101 505<br />

OPENXML 509<br />

A Brief Word on XSLT 514<br />

Summary 516<br />

xxviii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!