Formats
XML Formatter
Format, validate, and beautify XML documents.
How to use it
- Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type XML Formatter and press Return.
- Paste or type your text into Input.
- Adjust the Options on the right if you need to. The defaults are listed below.
- Press Format, or ⌘↵.
- Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.
Options
| Option | Values | Default |
|---|---|---|
| ModePretty print or minify XML | Pretty, Minify | Pretty |
| Indent SpacesNumber of spaces for indentation | 1–8 | 2 |
| Preserve CDATA sectionsKeep CDATA sections intact | On or off | On |
Example
Real output from Devly, with the default options.
Input
<app><name>Devly</name><version>2.3.0</version><tools count="65"><tool>Base64</tool><tool>JSON Formatter</tool></tools></app>
<?xml version="1.0"?>
<app>
<name>Devly</name>
<version>2.3.0</version>
<tools count="65">
<tool>Base64</tool>
<tool>JSON Formatter</tool>
</tools>
</app>From Terminal
With the free command-line tool installed:
Terminal
devly xmlformat --path input.txt # or pipe text in pbpaste | devly xmlformat
Quick Switch also finds it by: xml, format, validate, beautify, minify.
More Formats tools
JSON FormatterFormat, validate, and minify JSON with syntax highlightingJSON Path QueryQuery JSON data using JSONPath expressionsJSON ↔ YAMLConvert between JSON and YAML formatsYAML FormatterFormat, validate, and beautify YAML documentsXML ↔ JSONConvert between XML and JSON formatsCSV → JSONConvert CSV data to JSON format