Basically what you need to do to achieve this is open Properties view in Window > Properties menu or using the shortcut Ctrl + Shift + 7. After that, select your file directly in Projects, Files, Favorites or even by opening it in the editor. Now, if you select a XML file for example, your Properties view should be something similar as the image below.
Now you can change the Extension property and the file type will be change as expected. I hope this little tip can help you.