25 chars · 1 line
Waiting for input
25 chars · 1 line
Waiting for input
XML closing-tag troubleshooting
The sample finishes after the name element but never closes service. XML does not infer the missing boundary at end of file, so every non-self-closing start tag must eventually have a matching end tag. This tool is free to use. No account or payment is required.
Last updated
The parser may report the failure at the end of the document because that is where it becomes certain that an element can no longer be closed. The actual omission can be several lines earlier.
Elements written as <item/> are already closed. Elements written as <item> require </item>, even when they contain no text or child elements.
Add </service> after the nested name element.
<service><name>api</name><service><name>api</name></service>Common questions
Every ordinary start tag needs a matching end tag. A self-closing tag such as <item/> closes itself.
The parser may not know an element will remain unclosed until it reaches the end of the document.
Formatting requires well-formed XML first. Correct the missing boundary, validate, and then format the document.
Debugging a specific XML issue? Browse XML troubleshooting.