XML editor with well-formedness checks

The example is a one-line RSS feed. Format it with Shift+Alt+F, then press Run to check that it is well-formed.

Loading the editor…

Checks and formatting

Run parses the document with the browser’s DOMParser and reports the first error and its location. Formatting re-indents elements while keeping attribute values, CDATA sections, comments and processing instructions intact; whitespace between elements is normalised, which is why the formatter is labelled APPROX for mixed-content documents.

DTD and XML Schema validation are not performed.

SVG files

Open an .svg file and press Run to see it rendered as an image after sanitising, with a list of anything unsafe that was removed.

How to use it

  1. Press Shift+Alt+F to pretty-print the feed.
  2. Press Run to validate.
  3. Remove a closing tag and run again to see the error.

Questions

Does it validate against an XSD?

No. Only well-formedness is checked. Schema validation would need a validator that is not bundled.

Will formatting change my data?

Element text and attribute values are preserved. Whitespace-only text between elements is re-indented, which matters only for mixed-content documents.

Can I minify XML?

Yes, on the code minifier page, which removes comments and whitespace between elements.