I own both.
My only problem with Glock, other than the childishness of "only Glock" owners, is the way they have addressed "upgrades" over the years. I had one that was effected by the slide issue and needed a replacement frame. I read about it on Glock Talk, and Smyrna support all but refused to acknowledge the issue, until I got hot about it. I got the new frame, but I had to fight to get it. Contrast that to a Walther P-99 issue that took one phone call, no heat, they readily acknowledged and explained the issue, and parts were on the way immediately and received in a couple days.
That said, if I had to choose, it would be an XD because of the jugheads in Smyrna (and children on GT; which is a group I would prefer not to be associated with). The XD is deadly accurate, the Glock is not. The XD is a fine firearm, the Glock is really good.
Items like the cocked indicator, grip safety, and loaded chamber indicator have not been implemented by Glock because of arrogance. It was other manufacturers who made those items popular, and Gaston will not likely accept them anytime soon. I couldn't believe Glock released a green frame. That must have been a bid spec on a large purchase.
If you like the bells and whistles, and a manufacturer who implements such items to enhance safety and functionality, the XD is the choice.
I cannot see myself going to the adoption center, and thinking 'golly gee, which Glock\XD\Sig do I not have. I got to get all the Glocks\XD\Sigs. I don't have one of the green ones, yeah, I will get that'. I go to the adoption center to get a classic I do not already have. The last time I went to an adoption center, the XD was the one I did not have, and wanted. Now it sits well with Walthers, Sigs, HK, Kimbers, Glock, Smith, and Rugers.