APPX packages are apps for Windows Phone 8.1 and later, whilst XAP packages were used up until Windows Phone 8. It is extremely unlikely that some way how one could be converted to another (in this case APPX to XAP) exists, or vice versa. That's something the developer of the app could do if he would release two versions for both Windows Phone 8 and 8.1.
Open APPX file Open XAP file