What the error means
Unlike HTML, XML is parsed strictly: a single violation stops the parser, and the browser then shows the error instead of the page. "Not well-formed" means the document breaks a basic syntax rule, such as an unescaped & or a tag that is not closed. It does not mean the content is wrong for an application; that is a separate check against a schema.
The editor above opens on XML with an unescaped ampersand, the most common cause. Click Validate to see the position it reports.
Causes and fixes
The messages are what Chrome reports for each example.
Unescaped ampersand
Error: error on line 1 at column 13: xmlParseEntityRef: no name
Invalid
<title>Tom & Jerry</title>
Fixed
<title>Tom & Jerry</title>
A bare & starts an entity reference, so the parser expects a name after it. Write & as & and < as < in text and attribute values.
HTML entity such as
Error: error on line 1 at column 10: Entity 'nbsp' not defined
Invalid
<a>Hello world</a>
Fixed
<a>Hello world</a>
XML defines only five named entities: & < > " and '. Use a numeric reference (  for a non-breaking space) or the character itself.
Mismatched tag
Error: error on line 2 at column 17: Opening and ending tag mismatch: to line 2 and from
Invalid
<note> <to>Ada</from> </note>
Fixed
<note> <to>Ada</to> </note>
The closing tag must match the opening tag exactly, including case. Firefox words this "mismatched tag. Expected: </to>".
Extra content after the root element
Error: error on line 1 at column 9: Extra content at the end of the document
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. Firefox words this "junk after document element".
Unquoted attribute value
Error: error on line 1 at column 10: AttValue: " or ' expected
Invalid
<book id=bk101/>
Fixed
<book id="bk101"/>
Every attribute value must be in single or double quotes, unlike in HTML.
Invalid control character
Error: error on line 1 at column 4: PCDATA invalid Char value 1
Invalid
<a>[U+0001]</a> (an invisible control character between the tags)
Fixed
<a></a>
Most control characters below U+0020 are not allowed in XML at all, even escaped. Remove them from the data; they often come from copying text out of a binary or log file.