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.
Expected closing tag
InvalidTagExpected closing tag 'item' (opened in line 2, col 3) instead of closing tag 'channel'.An element was closed out of order: the parser met a end tag for an ancestor while a child was still open.
Unclosed tag
InvalidTagUnclosed tag 'urlset'.The document ended, or a construct swallowed the rest of it, while an element was still open.
Closing tag has not been opened
InvalidTagClosing tag 'url' has not been opened.An end tag appeared with no matching start tag anywhere above it.
Character is not expected
InvalidCharchar '&' is not expected.A raw character appeared where markup was required — most often an unescaped ampersand.
Start tag expected
InvalidXmlStart tag expected.There is no element at all — the input is empty, or it is not XML.
XML declaration allowed only at the start of the document
InvalidXmlXML declaration allowed only at the start of the document.Whitespace precedes <?xml. A blank line or a single space before the declaration is enough.
Attribute is without value (unquoted attribute value)
InvalidAttrAttribute 'priority' is without value.An attribute value is not quoted. XML requires quotes around every value, including numbers.
Attribute is repeated
InvalidAttrAttribute 'href' is repeated.The same attribute name appears twice on one element, which XML forbids outright.
Attributes have open quote
InvalidAttrAttributes for 'image:image' have open quote.An attribute value was opened with a quote that is never closed.
Tag is an invalid name
InvalidTagTag '2026-total' is an invalid name.An element name breaks XML's naming rules — usually because it starts with a digit.
Invalid tags found (open elements at end of input)
InvalidXmlInvalid '[ "urlset", "url"]' found.The input ended with several elements still open; the validator lists the whole open stack.
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.