I've got an XD-40c and love it. I once owned a G-17 but I just never got used to it in my hand so I traded it off.
I am not saying that XD's are better that Glocks but for me the XD is the better choice.
I have both and can see the pros and cons of both. The XD is a bit on the heavy side but it points true (almost like a 1911). The Glock is lighter and damn near dummy proof but the grip to barrel angle is funky. This is one of those debates that will never have a winner. A fella can't go wrong with either one.
I tried hard to like Glocks. I tried different calibers etc. but they just don't do it for me. I tried an XD at the range but haven't owned one. For me the plastic pistol that shoots best for me is the S&W M&P 40. I keep thinking I'll get one of my own but haven't yet.
You can't argue the reliability of either. They have both been tested to the limits and even more than most would expect and come out champs.