Just posted a github gist containing a couple of plugin scripts to allow me to tidy xml selections or json selections in a buffer. They are kind of rough and tumble, but take a look and let me know what you think.
https://gist.github.com/1138554
Thanks!