Turning on XML syntax highlighting in vim for a non-XML file
The command you want is ":setfiletype
". For example:
:setf xml
See ":help :setfiletype
".
You can place this in your ~/.vimrc file as well
au BufNewFile, BufRead *.extension_name set filetype=xml
Replace extension_name with the extension you want, reopen vim, and you will see xml syntax highlight.