14 chars · 1 line
Waiting for input
14 chars · 1 line
Waiting for input
XML trailing content troubleshooting
The sample closes <root/> and then continues with payload text. XML allows limited trailing markup such as comments or processing instructions, but ordinary non-whitespace character data cannot appear after the document element. This tool is free to use. No account or payment is required.
Last updated
Once the root element closes, the XML tree is complete. A parser cannot attach later ordinary text to that tree, so concatenated status messages or payload fragments must be removed or represented inside an element.
Keep the text inside the single document element.
<root/>payload<root>payload</root>Common questions
Yes. Comments and processing instructions may appear in the epilog, but normal character data may not.
The root itself can be valid while extra bytes after it make the overall document malformed.
Only when the trailing content is whitespace. Real text must be removed or moved into the XML tree.
Debugging a specific XML issue? Browse XML troubleshooting.