This visual studio extension will format currently open xml file by sorting your attributes in the specific order that you choose.
While also formatting for whitespace. And preserving the comments.
Formatter bundles unknown attributes and sorts them alphabetically. Then appends them to the end.