I own a SA XD 9mm 4 inch and a Glock 35 40 cal. I enjoy shooting the xd more because im left handed and the ambidextrous mag release really helps. I have an extended mag release that digs into my hand and hurts.
I like the safety features on the XD more. It shows when a round is chambered I like the grip safety and the striker fire pin indicator at the rear(some people do not like the grip safety so its all personal preference). IMO I would feel more comfortable concealing the XD than the glock because of the safety features( although glocks are very safe to carry. Just a personal preference.)
I like the finish on the glock better. I bought a first gen XD about 8 or 9 years ago. They are known to have issues with the finish. It scratched easily and im getting some rust. I think the newer generation pistols have been improved greatly. The glock however is top notch.
A poster above said the glock is easier to take down...not really sure what hes talking about, they are both equally easy. With the XD you just flip a lever up pull the trigger and slide forward. Easy as pie.
Both pistols have shot flawlessly for me and you cant go wrong w/ either. The grip is more like a 1911 on a XD and the glock is more angled. You should goto a gun store and hold one(and if possible fire one) before you buy. Check out the XDM is you have the extra cash.
GO BADGERS! (UNIVERSITY OF WISCONSIN-MADISON)