Well-formed versus valid
Well-formed means the document follows XML's syntax rules, and that is what this page checks. Valid means it also conforms to a schema (an XSD or DTD) that lists which elements are allowed. Checking against a schema needs the schema file, which this tool does not take.
Because the browser's own parser does the work, the wording of an error depends on the browser you use.
Common XML errors and how to fix them
Each example below fails the well-formedness check.
Mismatched or unclosed tag
Invalid
<note> <to>Ada</from> </note>
Fixed
<note> <to>Ada</to> </note>
Every opening tag needs a closing tag with the same name and case, closed in reverse order of opening. <Note> and <note> are different tags.
Unescaped ampersand or less-than sign
Invalid
<title>Tom & Jerry</title>
Fixed
<title>Tom & Jerry</title>
In text and attribute values, write & as & and < as <. A raw & starts an entity reference, so the parser expects a name and a semicolon after it.
Unquoted attribute value
Invalid
<book id=bk101>
Fixed
<book id="bk101">
Unlike HTML, XML requires quotes (single or double) around every attribute value.
More than one root element
Invalid
<a>1</a> <b>2</b>
Fixed
<root> <a>1</a> <b>2</b> </root>
A document has exactly one top-level element. Wrap the pieces in a parent element.
Whitespace before the XML declaration
Invalid
<?xml version="1.0"?> <a/>
Fixed
<?xml version="1.0"?> <a/>
If the document has an <?xml ...?> declaration, it must be the very first thing in it, with no blank line or space before it.