I see a lot of posts in this thread about hand fit, safeties, what you shoot best, etc. that are all good and relevant points.
When I hear a question like Glock vs XD, I'm thinking the op wants a single pistol that might be used for defensive purposes. I'm also thinking about the very real possibility of a SHTF scenario in the US, which is very likely to occur, especially with the deficit being at 1.5 Trillion and the Fed monetizing the debt for the next few months. So, this changes the game in the way I would make this decision.
So, the key factors for me is reliability, availability of parts and ease of detail stripping and replacing any parts necessary to keep the gun up and running.
The Glock fits this bill perfectly. The XD does not.
The Extractor on an XD is a critical part that is a royal bitch to replace on your own. This in my mind should be factored in for strong consideration...