Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Validator

XML Validator


Use our XML validator to check the syntax of your XML file.


XML errors will terminate your program

Errors in an XML document will terminate your XML application.

The W3C XML specification states that if an XML document contains errors, the program should not continue processing the document. The reason is that XML software should be lightweight, fast, and highly compatible.

With HTML, it is possible to create documents containing many errors (for example, you forget an end tag). One of the main reasons is that HTML browsers are quite bloated, have poor compatibility, and have their own ways of determining what the document should look like when an error is found.

With XML, this should not happen.


Check the syntax of your XML

To help you check the syntax of your XML, we have created an XML validator.

Paste your XML into the text box below, then click the \"Validate\" button to check the syntax.

Example with correct syntax:

Example with incorrect syntax:

**Note:** Only whether your XML is \"well formed\" is checked. If you want to validate XML against a DTD, please see the last paragraph on this page.


Validate XML against a DTD

If you run Internet Explorer, you can validate your XML against a DTD in the text area below.

Simply add the DOCTYPE declaration (with the DTD) to your XML after the element, then click the \"Validate\" button: