Let's face it, currently, the most used formats for transactions and sending information among systems are JSON and XML. From my personal perspective JSON is a better option when we need to use REST services, because:
- JSON is a lighter format.
But... sometimes, we need to use XML format and many times we download the XML responses to our local environment to understand its structure, and here is the little problem, browsers don't format XML when we download a response. Let's see an example:
Imagine you have this response:
Sublime Text 2 has a really good plugin to format XML files with a single click! Here is the plugin: SublimeText Indent plugin.
This plugin also works for JSON format.
- Open your Package Control (if you have never used Package Control, please see this documentation)
- Type Indent
- Click on the link/option
- Wait for installation's finalization
- You will have a new option in Selection menu
After click on Indent XML you will see something like: