- Well-Formed
- Follows the XML syntax rules: matching start and end-tags, correct syntax for attributes and entities, a single root element, correctly nested elements, etc.
- Valid
- Follows the rules in the DTD.
- Internal
- Within the XML document itself. Example:
<?xml version = "1.0"?>
<!DOCTYPE catalog [
...declarations go here...
]>
- External
- In a separate file, referenced by the XML document. Example:
<?xml version = "1.0"?>
<!DOCTYPE catalog SYSTEM "catalog.dtd">