Never shot a Glock, but I would say that it would really really have to be an excellent shooting gun to top the XD... and it may be, but I don't know. I just got back from the range a few hours ago... probably the 5th or 6th trip with my XD-9 and I still can't get over how accurate that thing is for a 3" barrel! I shot tighter groups with it than I did with my Baby Eagle, it has a lot better feel to it than any other gun that I have fired and it has been 100% reliable thus far (put around 1000 rounds through it after today's trip to the range).
I have held both the Glock 26 and the XD-9 sub-compact (the one that I bought), and though the springfield is a bit more top-heavy, it felt so much more sturdy and well-built. I can't help but think that the fact that it's top is a bit larger than a Glock helps in the recoil.... as it has less recoil than my full size baby eagle.
Bottom line: of all the guns that I have owned and shot, the XD-9 is by far my favorite and if the Glock is better than the XD, it isn't $50 better, which is the price difference between the two.