Both guns put you in the Stock Service Pistol class. You are limited to 10 rounds so capcity isn't an issue. I have a M&P .45 and plan on getting a M&P 9MM L at some point. The M&P has the interchangable backstraps and does not have the grip safety (I don't like it at least). However if the XD fits your hand better that is a good choice too.
Whatever you do make sure the M&P does not have the magazine safety. In IDPA, at the end of a stage, you have to show clear with the slide open and magazine out. The you are told to put the slide forward and drop the hammer (pull trigger). That is a big hassle if you have to put the magazine back in.