I have made a Text Filter for BBEdit which uses `tidy` to reformat XML.
It does not attempt to do anything other than clean it up.
You can find it at:
https://github.com/tjluoma/text-filters/raw/master/Tidy-XML.sh
It should also be easy to change any `tidy` argument that you wish to
use differently.
I am by no means a `tidy` expert, I have just found that these
settings work for me. I would welcome suggestions for possible
improvements.
(See
https://github.com/tjluoma/text-filters if you need help figuring
out how to install Text Filters for BBEdit)
TjL