Extra content at the end of the document
A second top-level element or text after the closing root makes a document malformed. Put related elements inside one agreed root, or process separate documents separately. Comments and processing instructions outside the root can be legal.
Keep one document element
A second top-level element or text after the closing root makes a document malformed. Put related elements inside one agreed root, or process separate documents separately. Comments and processing instructions outside the root can be legal.
Reproduced engine diagnostics and complete fixes
Original minimal examples checked on 2 November 2026. Engine wording differs; follow the cause, not a message alone.
libxml2-wasm 0.7.2
Extra content at the end of the documentXerces2-J 2.12.2 / Temurin Java 21.0.13+9-LTS
The markup in the document following the root element must be well-formed.lxml 6.0.2 / libxml2 2.14.6
Extra content at the end of the document.NET 10.0.14 / System.Xml
There are multiple root elements. Line 1, position 6.libxml2-wasm 0.7.2
Extra content at the end of the documentXerces2-J 2.12.2 / Temurin Java 21.0.13+9-LTS
The markup in the document following the root element must be well-formed.lxml 6.0.2 / libxml2 2.14.6
Extra content at the end of the document.NET 10.0.14 / System.Xml
There are multiple root elements. Line 1, position 6.libxml2-wasm 0.7.2
Extra content at the end of the documentlxml 6.0.2 / libxml2 2.14.6
Extra content at the end of the document.NET 10.0.14 / System.Xml
There are multiple root elements. Line 1, position 6.Repeat this check in your workflow
API, Python CLI and GitHub Actions starter are available for automation. The public API is early access; paid CI authentication and SLA are not offered. Pro: US$19/month, 25-file batches and 10 saved schemas. Team: US$49/month, 100-file batches, 100 schemas and five seats.