Create new file type association

view story

http://unix.stackexchange.com – Let's assume I have a program X that uses files with the extension .xez. How can I make X the default application for all files with the extension .xez? My first idea was xdg-mime default X.desktop application/.xez. Yet this does not work. Files with the extension .xez are still associated with Gnome Archive Manager since files with .xez represent a sort of .zip archive. (HowTos)