I have owned both and they are both great pistols and will work fine, but with that said I bought the xdm 3.8 as my first ccw pistol but after a year i sold it and bought the m&p9c and that is my current carry pistol.
I found the XDm to be a little too heavy even in a good crossbreed, it was a little too big and was tough to conceal with my summer wardrobe. I liked the trigger much better than that of the the m&p but favor the low bore axis and very ergonomic grip of the m&p9c.
But what it really came down too was i could shoot my friends m&p9c far better (faster and more accurately) than i could my own XDm. I dont know why but that is just how it worked out for me. I highly suggest you go to a gun shop and look at both side by side, tell the clerk to be quiet (i could get talked into a buying anything) and just pick the one that fits you the best.
Pat