tomek-he-him / format-xml

A streaming XML beautifier. Fully customizable.
MIT License
1 stars 1 forks source link

Travis – build statusCode climateDavid – status of dependenciesCode style: airbnb

format-xml

A streaming XML beautifier.
Fully customizable.
Opt-in – no magic.

Heads up! This is DEFINITELY NOT READY FOR USE YET. Ideas and criticism are very welcome though.

Installation

  1. Make sure you have Node.js or io.js. On Unix-like systems you’re best off with nvm. Windows have official installers.

  2. Install the CLI for your user:

$ npm install --global format-xml

Usage

Out of the box – minimal output:

$ format-xml < dirty.xml > clean.xml

Smart presets:

$ format-xml --preset svg < dirty.svg > clean.svg

CLI configuration:

$ format-xml --indent-string "\t" < dirty.xml > clean.xml

JSON or safe CSON configuration:

$ echo "indentString: '\t'" > .format-xml.cson
$ format-xml < dirty.xml > clean.xml
$ # or:
$ format-xml --config-file .format-xml.cson < dirty.xml > clean.xml

Alternatives

This tool is focused and configurable. If you’re after something else, you might try these out:

License

MIT © Tomek Wiszniewski