14 chars · 1 line
Waiting for input
14 chars · 1 line
Waiting for input
XML document boundary troubleshooting
The sample starts with ordinary payload text before <root/>. XML permits a prolog, comments, processing instructions, and an optional document type before the document element, but standalone character data must live inside the element tree. This tool is free to use. No account or payment is required.
Last updated
Whitespace can surround the document element, but non-whitespace text before the root is not part of a well-formed XML tree. This often happens when log prefixes, byte-order artifacts converted to text, or response wrappers are concatenated with XML.
Move ordinary text into the root element.
payload<root/><root>payload</root>Common questions
Yes. A valid prolog can contain an XML declaration, comments, processing instructions, and an optional DOCTYPE, but not ordinary character data.
Yes. Leading whitespace is different from non-whitespace text such as payload or status messages.
Yes. Debug text or transport wrappers placed before the XML document will make the response fail XML parsing.
Debugging a specific XML issue? Browse XML troubleshooting.