Search

B.17.2.3. Opening and ending tag mismatch

download PDF
Symptom
The following error occurs:
error: (name_of_guest.xml):61: Opening and ending tag mismatch: clock line 16 and domain
</domain>
---------^
Investigation
The error message above contains three clues to identify the offending tag:
The message following the last colon, clock line 16 and domain, reveals that <clock> contains a mismatched tag on line 16 of the document. The last hint is the pointer in the context part of the message, which identifies the second offending tag.
Unpaired tags must be closed with />. The following snippet does not follow this rule and has produced the error message shown above:
<domain type='kvm'>
  ...
    <clock offset='utc'>
This error is caused by mismatched XML tags in the file. Every XML tag must have a matching start and end tag.
Other examples of mismatched XML tags
The following examples produce similar error messages and show variations of mismatched XML tags.
This snippet contains an unended pair tag for <features>:
<domain type='kvm'>
 ...
 <features>
   <acpi/>
   <pae/>
 ...
 </domain>
This snippet contains an end tag (</name>) without a corresponding start tag:
<domain type='kvm'>
  </name>
  ...
</domain>
Solution
Ensure all XML tags start and end correctly.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.