convertCASEpro

MODE

XML Formatter

Paste XML to check it and lay it out with clear indentation.

INPUT
CHARS: 0WORDS: 0LINES: 0
OUTPUT
CHARS: 0WORDS: 0LINES: 0

How the XML Formatter works

The document is first checked with the browser's XML parser, so only well formed XML is formatted and a malformed tag, a mismatched closing tag or an unescaped ampersand is reported instead of being silently accepted. Beautify mode then indents nested elements and puts short text only elements on a single line. Comments, CDATA sections, processing instructions and the XML declaration are preserved.

Minify mode removes whitespace between tags while leaving text content alone.

When it is useful

  • •Reading SOAP responses, RSS feeds and sitemaps.
  • •Validating a config or data file before importing it.
  • •Shrinking XML before embedding it in a request.
  • •Preparing a readable snippet for documentation.

Frequently Asked Questions

Does it validate against a schema?

No. It checks that the XML is well formed but does not compare it with an XSD or DTD.

Will formatting change the data?

Whitespace in element content might be trimmed when text is moved onto one line. For mixed content, such as text with inline tags, check the result.

Can it handle namespaces?

Yes. Prefixes and namespace declarations are kept exactly as written.

Related tools

[ Browse all tools ]