XML error reference · XV026

Closing tag with no matching open tag

An end tag appears for an element that is not currently open.

What your parser calls it

The same problem, reported differently by each parser. If you arrived here from one of these strings, you are in the right place.

ParserMessage
libxml2 / xmllintOpening and ending tag mismatch
.NET XmlExceptionUnexpected end tag.

What causes it

The parser found `</name>` while no element named `name` was open. Either the start tag is missing, it was already closed by an earlier end tag, or the element was written as self-closing and then closed again.

See it happen

Triggers the error
<root>
  <item/></item>
</root>
Corrected
<root>
  <item/>
</root>

How to fix it

Delete the stray end tag, or add the matching start tag. Watch for `<item/></item>`: a self-closing tag is already complete and must not be followed by an end tag.

Fix your own document

Paste your own document below. Press Sample if you want the broken example above loaded instead. Nothing you paste leaves this tab.

XML Validator

Well-formedness and schema validation. Nothing is uploaded.

Input
WaitingPaste a document to check it. Validation runs as you type.

Everything runs in this tab. Nothing you paste is uploaded, logged or sent anywhere. Open your network panel and check.

Tools that catch this

Background reading

Errors this fixes

Every XML error, explained