Ctrl + Shift + F. Will do it for you, and you can configure it in. Window -> Preferences -> XML -> Xml Files -> Editor ...
stackoverflow.com