>> English << | česky | Español | Português | Türkçe | Nederlands | По-русски | Deutsch | Français | Italiano | 中文 | ქართული | Magyar | PolskiZVON > Tutorials > XML Tutorial
>> Example 4 << | Prev | Next | Contents

Description

If the start-tag is in the content of another element, the end-tag is in the content of the same element. More simply stated, the elements, delimited by start- and end-tags, nest properly within each other.

Well-formed documents


Elements are properly nested. :


<Weight>

     <number>12</number>

     <unit>grams</unit>

</Weight>


Another well formed document:


<book>

     <chapter>

          <title>Introduction</title>

     </chapter>

     <chapter>

          <title>Story</title>

          <subChapter>

               <title>Part 1</title>

          </subChapter>

          <subChapter>

               <title>Part 2</title>

          </subChapter>

     </chapter>

     <chapter>

          <title>Index</title>

     </chapter>

</book>


Documents with errorsTop


Element <italic> is not properly nested:


<text>

     <bold><italic>XML</bold></italic>

</text>