How to use it
- Choose an XML file, drop it on the box, or paste XML; the result appears at once.
- Read the result: “Well-formed XML” with a short summary, or the first error with its line and column.
- Fix the error at the marked position and check again until the document is well-formed.
Rules and limits
What is checked
- Well-formedness as defined by XML 1.0 and Namespaces in XML 1.0: one root element, matching and properly nested tags, quoted and unique attributes, valid names and characters, defined entities, declared namespace prefixes.
- The check stops at the first error and shows its line and column with the text around it.
- The document is not validated against a DTD or an XML Schema (XSD). External files are never loaded; entities defined only there, such as
in XHTML, are listed in a note.
Questions and answers
Does it validate against an XSD schema or a DTD?
No. A well-formed document can still break its schema. The validator reads a DOCTYPE and its internal entity declarations, but it does not check the document against the DTD.
Which errors are most common?
An unescaped & in text (write &), a closing tag that does not match the open element, a second element after the root element has ended, and blank lines or spaces before the <?xml …?> declaration.
How are lines and columns counted?
Lines and columns start at 1. CRLF, LF and CR each end a line, and every character (Unicode code point) counts as one column. The position is where the problem was detected: for an element that is never closed, that is the end of the file, and the message names the line where the element was opened.