The XD is a great gun and a favorite of mine. I really like the feel of both the XD and the M&P. I would take the time and get familiar with these guns and the students as well and then buy. You might also consider the Ruger SR9. The Ruger is not a flat top and some like that better. You will get great service out of all the mentioned above. I have had good luck with my Glock 27 and also my Sigs.
Thank you.