If you are looking to format the code as you enter the text, there are some additional settings in Tools\Options\Text Editor area.
Since your example appears to be a config file (XML) look at the XML editor.
Otherwise, to format at any time, the suggestions from @mitaka and @Xaruth are good.
Be aware that the keystrokes to activate Format Document and Format Selection are different depending on what Development Settings you have active in Visual Studio. To see which keystrokes are assigned to the command in your copy of VS look in the Edit menu.