An XML Validator
To help you check the syntax of your XML files, we have created an XML validator to syntax-check your XML.
Valid XML Documents
A valid XML document is not the same as a well formed XML document.
The first rule, for a valid XML document, is that it must be well formed (see previous paragraph).
The second rule is that a valid XML document must conform to a document type.
Rules that defines legal elements and attributes for XML documents are often called document definitions, or document schemas.
When to Use a Document Definition?
A document definition is the easiest way to provide a reference to the legal elements and attributes of a document.
A document definition also provides a common reference that many users (developers) can share.
A document definition provides a standardization that makes life easier.
When NOT to Use a Document Definition?
XML does not require a document definition.
When you are experimenting with XML, or when you are working with small XML files, creating document definitions may be a waste of time.
If you develop applications, wait until the specification is stable before you add a document definition. Otherwise, your software might stop working because of validation errors.
There are different types of document definitions that can be used with XML:
- The original Document Type Definition (DTD)
- The newer, and XML based, XML Schema