Skip to main content

Reference

XML parsing errors

Every XML parser words the same defect differently. Each page explains one real failure, shows a broken and a fixed document, and lists how Xerces, expat, .NET and Go phrase it — including the cases permissive parsers accept outright.

Any parser — libxml2, Xerces, expat, .NET, Go. A whole stack trace is fine. Nothing is sent anywhere; the matching happens in your browser.

Every documented error

27 well-formedness failures, each with the exact message XMLDir reports and the equivalent from the other parsers.

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 with the XSD validator.

Schema failures have their own reference: XSD validation errors covers the documents that parse perfectly and are still rejected — including the cvc- codes Xerces reports.

Get started

Paste the document that is failing.

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