I commented out my entire .vimrc file, then added a few indentation related things. Using the process of elimination, I landed on the following line being solely responsible getting my XML indentation to work:
filetype plugin indent on
However, this only worked when loaded from the .vimrc file. Manually typing it in had no effect for me.
You can enable loading the indent file for specific file types with:
:filetype indent on
If filetype detection was not switched on yet, it will be as well.
This actually loads the file "indent.vim" in 'runtimepath'.
The result is that when a file is edited its indent file is loaded (if there
is one for the detected filetype). |indent-expression|
If you have
filetype indent on enabled in your .vimrc and don't have indentation, you're probably missing the indentation definition file.