DTD Validation
Using Internet Explorer, you can validate your XML against a specific DTD.
Validation through XML Parser
When you attempt to open an XML document, the XML parser may generate errors. By accessing the parseError object, you can retrieve the exact error code, text, and even the line where the error occurred.
Note: The load() method is used for files, while the loadXML() method is used for strings.
Example
Disabling Validation
You can turn off validation by setting the XML parser's validateOnParse to "false".
Example
Generic XML Validator
To assist you in validating XML files, we have created this link so you can validate any XML file.
parseError Object
You can read more about the parseError object in our XML DOM Tutorial.