|
In order to use XML, the document must comply with certain rules to be Well Formed.
The Well Formed rules for XML documents are:
1.Tags must be nested.
<a>
<b></b>
</a>
2. You cannot omit end tags
In HTML many developers leave out </br> and </p> tags. Most browsers will handle this correctly.
3. New syntax for end tags.
<car engine=”3000”></car>
<car engine="3000"/>
These are the same.
4. All documents must be contained in the root element.
Any document is well formed if it agrees with above rules.
If the document is to be checked for validity, the document uses a Document Type Definition (DTD). The document must begin with <!DOCTYPE> and agree to the above rules.
|