The Xml Indenter plugin allows you to indent the XML contents of the current open buffer. You can invoke the "Indent XML" action via a keyboard shortcut or toolbar icon.