How the XML Formatter Works
AnyTool formats, minifies, and validates XML using a real parser rather than regex. Beautify supports 2/3/4-space or tab indentation and minify reports byte savings; validation uses the browser DOMParser, extracting and normalizing the parsererror line, column, and message across engines. A collapsible tree view of the parsed DOM and an XPath evaluator (document.evaluate) round out the tool, and CDATA, comments, processing instructions, DOCTYPE, and namespaces are preserved untouched.
- Beautify (2/3/4-space, tab) and minify with byte stats
- DOMParser validation with normalized line/column errors
- Collapsible tree view and live XPath evaluator
- CDATA, comments, and namespaces preserved
- Real-time format and validate as you type
