Both are good guns. When I got my first gun I was between mp9,g19 and px4. and the walther p99 but I coudnt find any one to shoot..
The XD has a good trigger but I didnt like the gun so much; I liked more the mp9 so I got it. I feel less recoil whit this. 5000 rounds so far and 0 issue,and feel more comfortable in my hand, you can change the backstrap.. (but of course, thats me)
All of them are good guns, it is up to you which one do you prefer.
another important questions, for what do you want the gun? range, IDPA, USPSA, home defense, conceal?
The m&p9 is getting a good reputation and many LEs are getting those.. you can check comments at m4carbine.net ..
and it doesnt matter which one do you pick, it is probably you will be getting more and more guns hahahhahhaa
good luck and remember be safe and practice and practice...