I have an XD 40 Service model and would agree with what bigbulls has said (and some others). He gave a fair run down.
I just took mine through a defensive pistol class run locally by an instructor from Gunsite. Basically you can't go wrong with the Glocks, MPs or XDs. It's a matter of preference. After seeing all these and many more being shot in our class (and trying a couple) I'm very satisfied with my XD. The instructor even pointed out the extra features the XD has in class and recomended it to one of the participants. He also mentioned occasions when MPs and Glocks had gone off because something (string on a coat for example) was caught inside the trigger guard when holstering. The XD won't do that unless the grip safty is fully pressed.
XD has a lot of extra features that I've come to appreciate. All of them are being actively used in competition so accuracy and realiabitly really aren't the issues.
Spud
ORIGINAL: bigbulls
Both are excelent handguns but I prefer the XD. I like the added safety features that the XD has that the M&P doesn't.
Loaded chamber indicator is visual as well as physical. A little bar pops up at the rear of the ejection port that you can feel in total darkness to know if your gun is loaded when the bad guy is in your house with out you having to turn on a light and look. The M&P requires you to look in a little hole to see brass, kind of hard to do in the dark.
Cocking indicator is again visual as well as physical. A little steel rod pops out of the back of the slide so that you can feel intotal darkness of the gun is cocked or not. In the day time you can simply see a shiny rod poking out the back. I forget if the M&P pops out the back or is flush.
Grip safety on the XDdoes two things. First it must be depressed in order for the trigger to work, much the same way the 1911 operates. Second is that it must be derpressed for the slide to be operated thus forcing you to have complete control of the firearm before it can be operated. The M&P doesn't have a grip safety.
The trigger works much the samein both the XD andM&P in that it blocks itself from being pressed unless your finger is doing the pressing.
It breaks down much easier and quicker than does the M&P. The M&P requires you to flip out a little bar inside the gun before you can disassemble the gun.
The trigger pull on the XD is muchsmoother and crisperthan the M&P IMO.
The M&P does have interchangeable back straps to fit a wide variety of hand sizes.
Having said all of that you can't really go wrong with either.