I have both in their respective 9mm 5" versions. In fit, form, and function, they are virtually identical.
However, there are a few minute differences:
1. While the XD is lighter by about 1.5 ounces, it seems a bit more top heavy.
2. The grips on the XD are flatter on the sides, making them slightly more "block-ish" feeling.
3. The changeable backstrap on the M&P is a nice feature, but for the average person, the medium will fit well, and you'll never change it.
4. Magazines for the XD are cheaper and easier to get. Once SW catches up with production on their mags, this will probably become a non-issue.
5. Personally, I find the serrations on the M&P far easier to grip for a very quick slingshot. I have heard other people say they hate the M&P serrations.
This are all very little things that truly have no bearing on one being better than the other. I currently shoot my XD in competition, and I have roughly 6-7000 rounds through it since November. The only time I've had any failures with it has been when it's not been cleaned or lubed after multiple long (500+ round) practice sessions. (Oh, and when the aftermarket front site fell off after being poorly installed by a friend). I only have about 1500 rounds through my M&P since Christmas, and it's never failed.
Mac