How do I export an OBJ to an .X file
Enabling Import &amp; Export of DirectX 3D Model file format .X

Blender 2.70 comes with the "DirectX X Format" Export addon built-in.  

However, the "DirectX Importer" Import addon is not built-in. If you'd like to have the ability to import .X files, you can download it in this addon bundle.   (Note: that post describes how to add the addon to Blender's scripts folder.) 

To enable these:  


Info header -> File -> User Preferences  

  
Then, in the search box, type Direct. Two DirectX addons will appear: 


The one named "DirectX Importer" provides the ability to Import .X files
The one named "DirectX X Format" provides the ability to Export .X files
Check the checkbox at the right hand side of the addon to enable it
If you want to always have these import/export options in your File menu, then click on the Save User Settings button at the bottom of the screen:  



You will then have the .X file format as import &amp; export options: