Blender has a DirectX exporter. Go to Addons in User Preferences and look under Import/Export.
Check Export Animations, this should export all the animations in your file. I would recommend playing with the other animation options as well. You can read up on each setting on its wiki page.
Test 1: I enabled it and made a simple scene with two animations. I exported the file to
.x and opened it in a text editor and I saw the animations in there clearly labeled and with the transform locations I had used.
Test 2: I also downloaded a
.x viewer called 3dmodelviewer, exported a file from Blender with over 6 animations and it loaded and played them all so the exporter works with multiple animations.
NB: In my tests, I parented primitives to several different bones. I also noticed that I had to be in
pose mode when I was animating the objects, if not it doesn't work, not sure why.