Skip to main content

Reference

XML parsing errors

Every XML parser words the same defect differently. Each page here explains one real failure, shows a broken and a fixed document, and lists the equivalent message from libxml2, Xerces, expat and .NET.

Well-formed is not the same as valid

Every error on this page is a well-formedness failure: the document cannot be parsed into a tree at all. A document that parses cleanly can still break a schema, a business rule, or a search engine’s expectations — that is validation, and it is a separate step. Check the first with the XML validator and the second by supplying an XSD.

Get started

Paste the document that is failing.

XMLDir reports the parse error with its line and column, keeps the document so you can compare it against a version that worked, and extracts the structure of the ones that parse.