What "well-formed" means here, and what this tool does not check#
This tool checks well-formedness — every tag opened is closed in the right order, attribute quotes are terminated, and there is exactly one root element — the structural rules that apply to all XML regardless of its purpose. It does not validate against a DTD or XML Schema, which would check whether the specific elements and attributes used are the ones a particular vocabulary (like an RSS feed or an SVG file) actually allows. Well-formedness is necessary but not sufficient for XML to be correct for its intended use; schema validation is a separate, vocabulary-specific step this tool does not attempt.
Why leaf elements collapse onto one line#
A generic pretty-printer that puts every opening tag, its text, and its closing tag on three separate lines produces output that is technically indented but genuinely harder to scan than the input was. This formatter collapses an element that contains nothing but text — no nested tags — onto a single line, like <title>DevSEOCraft Tools</title>, and reserves the multi-line, indented treatment for elements that actually have children to show.
What survives untouched: comments, CDATA and the XML declaration#
A comment's content, a CDATA block's raw content (which can legitimately contain characters like < that would otherwise need escaping), and the leading <?xml version="1.0"?> declaration are all passed through exactly as written, never re-indented or re-wrapped into their surrounding text. Reformatting the inside of a CDATA block, in particular, would corrupt whatever raw content it exists specifically to protect.