28 chars · 1 line
Waiting for input
28 chars · 1 line
Waiting for input
XML declaration troubleshooting
The preloaded document puts <?xml version="1.0"?> after the root element. The XML declaration describes the document itself and, when used, must appear before the document element rather than as trailing processing content. This tool is free to use. No account or payment is required.
Last updated
It can specify version and encoding information for the XML document, but it is not an ordinary processing instruction that can be inserted after the root element.
If multiple source files each include their own declaration, joining their raw text can leave later declarations in the middle of the combined document. Merge the data at the XML tree level instead of concatenating full files.
Move the XML declaration before the document element.
<root/><?xml version="1.0"?><?xml version="1.0"?><root/>Common questions
No. Many XML documents are valid without one.
When present, it appears at the beginning of the XML document.
No. A later declaration usually indicates that complete XML fragments were concatenated incorrectly.
Debugging a specific XML issue? Browse XML troubleshooting.