XML DOM Validating XML Syntax
XML errors will stop your XML program
Errors in an XML document will stop your XML program.
The W3C XML specification states that if an error is found, the program should not continue processing the XML document. The reason is that XML software should be easy to write and all XML documents should be compatible.
With HTML it is possible to create documents with "errors" (such as missing closing tags). One of the main reasons HTML browsers are so large and incompatible is that when they encounter HTML errors, they each have their own way of figuring out what the document was supposed to look like.
With XML, this should not be possible.
Validate your XML syntax
To help check your XML syntax, paste the XML code in the text area below and press the "Validate XML" button.
Validate your XML file
To check the syntax of an XML file, type the URL of the file in the input field below and press the "Validate XML" button.
To validate an incorrect XML file, paste the following URL into the input field above: http://www.w3cschool.cc/dom/cd_catalog.xml
**Note:** When you access this file, if an "Access denied" error is displayed, it is because your browser's security settings do not allow cross-domain access.