They are both great firearms in my opinion. Here are my pros and cons:
Have been around for a very long time, and are time tested. Many police agency use glock pistols. You can find "aftermarket" parts for glocks very easily. For me, glocks tend to be a little bulky. It is harder to conceal a glock than an Springfield xd for me.
Has a grip safety, a external loaded chamber indicator, and a decent grip. There are also a lot of aftermarket parts for a xd. The XD's have not been around too long, but the new XDM seems to have worked out many of the "kinks" of the XD. Personally, I shoot better with the XD than with the Glock, and I enjoy carrying it and shooting it more.
Both are very reliable pistols, and I have yet to have either fail. Either pistol is a fine choice.