Asking for preferences between Glocks and XD,s often results in unsatisfactory feedback because it is based on emotion, e.g.
my gun is better than your gun and so on! Not that my feedback will be somehow a whole heck of a lot better but let me give you some of my personal thoughts.
First, I have owned and shot a lot of Glocks and could never get used to the safety system. I know, I know the best safety system is between one's ears and, if you don't mean to shoot, keep your finger off the trigger. But, the idea of the XD having a grip safety just makes be feel a whole lot more comfortable when I am carrying concealed.
A lost of posters express their preference for the Glock trigger. I just don't see it and, IMHO, there is not a lot of difference. If I am really concerned about a gun's trigger I get a gunsmith to adjust the trigger until I am satisfied. Glock or XD.
I am a real fan of the 45 ACP and, once again, I find the G21 too big and bulky and the G36 too small. I must admit that the G30 is one heck of a weapon and, except for the safety system, is my personal Glock "pick of the litter"!
The XD 45 has, for me, a much better grip and I do like the idea of 13+1 rounds. I find the guns really similar and it is the differences I have expressed that made me choose the XD 45. FWIW