XML Fundamentals

First, we need to look at a little basic XML. If you are already familiar with the basics of XML, skip this section.

XML groups data much like a Russian doll. If you take the logical top off, you will find another doll happily nested inside, and so on.

<DOLL1>
    <DOLL2>
        <DOLL3>
    <DOLL2>
<DOLL1>

Unlike a Russian doll, however, the contents can be multiple. You can take the top off an XML Russian doll and discover more than one doll, several, or even hundreds of thousands.

<DOLL1>
    <DOLL2>
        <DOLL3/>
    </DOLL2>
    <DOLL2>
        <DOLL3/>
    </DOLL2>
</DOLL1>

<DOLL1> is the parent mark up. XML is divided into mark up and content. Mark up is information about the contents, and can be described to any level of detail you require.

Correct mark up must ...

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.