Format XML code in Eclipse

Ctrl+Shift+F

Will do it for you, and you can configure it in

Window -> Preferences -> XML -> Xml Files -> Editor

Leave a Comment