Validating an XML Document
See Also
If you have an XML document that is constrained by an XML schema or DTD, you
can validate the XML document to check its contents for syntax errors.
If your XML document's DTD is located on a remote machine, ensure that
the IDE's proxy is correctly configured and you have access to the DTD.
- If the IDE cannot access the DTD, it returns a
single error message listing the DOCTYPE declaration. If the IDE cannot
access the XML schema, it displays Failed to read schema document.
To validate an XML document:
- Right-click the document's node in the Files window.
- Choose Validate XML.
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.
Common Error Messages
Some common error messages generated during DTD validation include:
- End of entity not allowed; an end tag is missing.
There is no final end tag for the document.
- Expected "</tagname>" to terminate element
started on line line#.
There is no end tag for the specific element.
- Element type "element name" must be declared.
The XML document contains an element type that was not declared in the DTD.
- See Also
- Setting a Proxy
- Working With XML Schemas
- Checking an XML Document for Well-Formedness
Legal Notices