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.

Chapter 16: A Brief XML Primer<br />

Figure 16-1<br />

Declaration<br />

476<br />

An Attribute is<br />

defined within<br />

the Opening tag<br />

of an element.<br />

Content between<br />

the opening and<br />

closing tags of an<br />

element is<br />

considered to be<br />

the “content” of<br />

that element.<br />

This can include<br />

raw text or other<br />

elements.<br />

Closing tag: every<br />

Opening tag must<br />

either be self-closing<br />

or have a closing tag.<br />

Attribute<br />

Attribute<br />

Declaration<br />

Opening Tag<br />

Attribute<br />

Opening Tag<br />

Element Content<br />

(Possibly Including Other Elements)<br />

Attribute<br />

Closing Tag<br />

Opening Tag<br />

Element Content<br />

(Possibly Including Other Elements)<br />

Closing Tag<br />

Closing Tag<br />

The Declaration<br />

is optional. If it<br />

exists, it must be<br />

first (even before<br />

white space) and<br />

follow a specific<br />

format.<br />

There is one<br />

and only one<br />

“root”<br />

element.<br />

All other<br />

elements<br />

must exist<br />

within the<br />

boundaries<br />

of that root<br />

element.<br />

Document<br />

The declaration is technically optional, but, as a practical matter, should always be included. If it exists, it<br />

must be the very first thing in the document. Nothing can be before the declaration, not even white space<br />

(spaces, carriage returns, tabs, whatever) — nothing.

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

Saved successfully!

Ooh no, something went wrong!