I have both an XD 9SC and an M&P 9C and prefer the M&P. That said, they're both good guns and until I got the M&P, I thought the XD was the nuts. Here are some observations.
XD - Top heavy slide, great safety system (USA) with trigger safety, backstrap safety and multiple loaded chamber indicators, a little boxy but shorter by a small margin in the grip, nice trigger, easy disassembly, good ergonomics and grip angle.
M&P - Seems better built (tighter), lower and longer sight profile comes to aim quicker, better trigger than XD, but this is for the experienced shooter that can keep their finger off the trigger when not shooting, because there is no other real safety, excellent ergonmics.
The first time I took my M&P Compact to the range, after one test magazine, I proceeded to put 3 full mags (36 bullets) right in the 10 circle at 25'. I really can't remember another gun that has been that accurate for me out of the box.