XML error reference
Every error this validator can report, explained. Each page gives the cause, a broken example and its correction, the equivalent message from six other parsers, and the validator itself so you can fix your own document on the spot.
Parsers describe the same problem in very different words. A missing semicolon after& is xmlParseEntityRef: no name in libxml2,EntityRef: expecting ';' in Firefox, andAn error occurred while parsing EntityName in .NET. All three are listed on the same page.
Errors29
- Unclosed tagAn element was opened but the document ended before its closing tag appeared.
Premature end of data in tag order line 1 - Mismatched closing tagA closing tag names a different element than the one currently open.
Opening and ending tag mismatch: To line 2 and to - More than one root elementThe document contains a second top-level element. XML allows exactly one.
Extra content at the end of the document - Document is emptyThe input contains no element at all.
Document is empty - Unescaped ampersandA raw & appears where XML expects the start of an entity reference.
xmlParseEntityRef: no name - Unescaped less-than signA raw < appears in text content, where it is read as the start of a tag.
StartTag: invalid element name - Invalid character in element or attribute nameA name uses a character XML does not allow, or starts with one it does not allow.
StartTag: invalid element name - Undeclared namespace prefixA prefix is used on an element or attribute without a matching xmlns declaration in scope.
Namespace prefix soap on Body is not defined - Duplicate attributeThe same attribute name appears twice on one element.
Attribute role redefined - Unquoted attribute valueAn attribute value is missing its surrounding quotes.
AttValue: " or ' expected - Unterminated attribute valueAn attribute value was opened with a quote that is never closed.
Unescaped '<' not allowed in attributes values - Content before the XML declarationSomething appears before the XML declaration, which must be the very first thing in the document.
Content is not allowed in prolog. - Malformed XML declarationThe XML declaration is present but its syntax or attribute order is wrong.
Malformed declaration expecting version - Unterminated commentA comment was opened with <!-- and never closed with -->.
Comment not terminated - Double hyphen inside a commentThe sequence -- appears inside a comment, which XML forbids.
Comment must not contain '--' (double-hyphen) - Unterminated CDATA sectionA CDATA section was opened with <![CDATA[ and never closed with ]]>.
Sequence ']]>' not found - Literal ]]> in text contentThe sequence ]]> appears in character data, where it is reserved.
Sequence ']]>' not allowed in content - Unterminated processing instructionA processing instruction was opened with <? and never closed with ?>.
ParsePI: PI xml-stylesheet never end ... - Malformed entity referenceAn entity reference is missing its terminating semicolon or contains an invalid name.
XML Parsing Error: EntityRef: expecting ';' - Undefined entityA reference names an entity that was never declared.
Entity 'nbsp' not defined - Invalid character referenceA numeric character reference points at a code point XML 1.0 does not allow.
xmlParseCharRef: invalid xmlChar value 0 - Illegal character in documentA raw control character appears in the document, which XML 1.0 does not permit.
PCDATA invalid Char value 12 - Attributes on a closing tagA closing tag carries attributes, which is never allowed.
expected '>' - Content after the root elementText or markup appears after the root element has closed.
Extra content at the end of the document - Closing tag with no matching open tagAn end tag appears for an element that is not currently open.
Opening and ending tag mismatch - Reserved xml prefix misuseThe reserved xml or xmlns prefix is bound to the wrong namespace URI.
xml namespace prefix mapped to wrong URI - Nesting depth limit exceededThe document nests deeper than the configured limit, which can exhaust the parser stack.
Excessive depth in document: 256, use XML_PARSE_HUGE option - Document too largeThe input exceeds the size this tool will process in the browser.
- Entity expansion limit exceededNested entity definitions expand to far more text than the source document contains.
Maximum entity amplification factor exceeded