Microsoft XML 2.5 SDK


 

Lesson 2: Authoring XML Documents

[This is preliminary documentation and subject to change.]

What is an XML document?

A basic XML document is simply an XML element that can, but might not include nested XML elements.

For example, the XML element "books" below is a valid XML document.

<books>
  <book isbn="0345374827">
    <title>The Great Shark Hunt</title>
    <author>Hunter S. Thompson</author>
  </book>
</books>

Authoring guidelines

There are several key things to remember when constructing a basic XML document:

All elements must have an end tag.

All elements must be cleanly nested (overlapping elements are not allowed).

All attribute values must be enclosed in quotation marks.

Each document must have a unique first element, the root node.