What the XML Editor does
The XML Editor is a single editing pane for XML. It checks well-formedness as you type, marks the line of the first error, and can indent or minify the document in place.
Using the XML Editor
- Type or paste XML into the editor. It is checked as you type; the status line and a highlighted line show the first problem.
- Format and Minify rewrite the document in the editor itself, so you can keep editing the result.
- Validate checks without changing anything.
XML Editor example
The built-in sample
Input
<users><user id="1"><name>Ada</name></user><user id="2"><name>Lin</name></user></users>Output
<users>
<user id="1">
<name>Ada</name>
</user>
<user id="2">
<name>Lin</name>
</user>
</users>This is the input that the Load sample button fills in.
Each output was produced by running this tool on the input above it.
How it works
About a third of a second after you stop typing, the document is checked with the browser's XML parser. Format puts every element on its own line, indented two spaces per level; Minify removes the whitespace between tags. If the document is not well-formed, the buttons change nothing and the first error is shown.
Details and limits
- While you type, the document is only checked for well-formedness. It is rewritten when you press Format or Minify.
- Format and Minify apply the same rules as the XML Formatter and XML Minify.
- Download saves the current editor text as an
.xmlfile. - Input that is not valid XML stops the tool, and the status line shows where the problem is. The XML Validator page lists the usual causes.
Questions
Is my data uploaded when I use XML Editor?
No. The tool runs in your browser, so what you paste or open is processed on your own device and is not sent to a server.
What does XML Editor do?
The XML Editor is a single editing pane for XML. It checks well-formedness as you type, marks the line of the first error, and can indent or minify the document in place.
How does XML Editor work?
About a third of a second after you stop typing, the document is checked with the browser's XML parser. Format puts every element on its own line, indented two spaces per level; Minify removes the whitespace between tags.
Are there any limits I should know about?
While you type, the document is only checked for well-formedness. It is rewritten when you press Format or Minify. Format and Minify apply the same rules as the XML Formatter and XML Minify.
Is there a size limit?
There is no fixed size limit. Everything happens on your device, so very large inputs depend on its memory and can take longer on a phone than on a computer.
Does it work on phones, and is it free?
Yes. It works in any current browser on Android phones, iPhones, tablets and computers. It is free and needs no account or sign-up.