Checking an XML Document for Well-Formedness
See Also
XML documents, including DTD, CSS, and XSL
files, are considered well-formed if they adhere to a basic set of grammatical
rules. The IDE enables you to check an XML document to
ensure it conforms to the necessary rules, including the following requirements:
- Every start tag must have a matching end tag. Tags are case-sensitive.
- Start, end and empty-element tags must have proper nesting, without missing
or overlapping tags.
- There must be exactly one root element, also known as the document element,
that does not appear in the content of any other element.
- Attribute values must be quoted. Attributes are listed in the start tag.
- An element cannot have two or more attributes with the same name.
- Comments and processing instructions cannot appear inside tags.
- No unescaped < or & signs can occur in the element's
character data or attribute's character data, except when used as markup.
To check an XML document:
- Right-click the document's node in the Files window.
- Choose Check XML, Check DTD, or Check CSS, depending on the document you
are checking.
The Output window lists any errors along with the line number where the error
was detected.
- This location is not necessarily the line where
the error occurred. You can double-click any error message to go to the
line in the XML file where the error was detected.
- See Also
- Validating an XML Document
- Creating a DTD
- Creating a Cascading Style Sheet
Legal Notices