More on the XD vs. Glock issue (I have both) and would agree with tapehoser.
The XD has conventional rifling which allows you to shoot lead bullets for cheaper practice. The Glock has polygonal rifling which is not recommended for lead bullets. Nothing wrong with polygonal - it can make more velocity, but has this possible drawback.
The XD has a fully-supported chamber which is more reload-friendly than the less supported chamber of the Glock. Basically a non-issue with factory ammo. This is mostly noticeable in .40 & .45 cals where on rare occasions hot reloads would blow out the case in the non-supported area and possibly ruin the gun. The Glock has improved in this issue over the last few years, and originally the generous chamber cutout was done to improve feeding reliability with the short, fat .40 S&W but is much less now for more support. All in all, the XD is better for the reloader.
The XD has a crisper trigger, but the Glock has a quicker reset for the 2nd shot.
The Glock Tennifer finish is somewhat superior to the Melonite finish of the XD. Early XDs lacked Melonite and were blued.
The XD loaded chamber indicator can stick when the mechanism gets dirty and needs to be taken apart and cleaned. Especially an issue when a lot of lead bullets are shot. The Glock has no such indicator, but the extractor sticks out further when the chamber is loaded.
Most feel the XD has a nicer grip angle and less square grip. I personally do fine with either however. The XD45 really is very soft shooting and holds 13 rds. of .45 in a grip no larger than the 15-rd G22 .40!
Really the XD was basically patterned after the successful Glock and, by virtue of coming into the game much later, made some nice minor adjustments to the general format and came up with a winner. S&W failed the first time with the Sigma generation 1 & 2, and now are trying with a total-makeover third generation M&P.