i would definily look at both
if you want a safety switch, get the HK
if it does not matter, well which would you prefer--striker or hammer; trigger/grip safety or manual, etc
finish should not matter to much for a working gun--but yea, the dark finish on XDs suck (go w/ the stainless); the HK finish is pretty good
there are other factors too-(these i dont like on the HK)--low tang (i cant get a high-enough hand grip that i am use to using), creepy DA trigger pull, bulky/top heavy slide (throws it a little off balance), expensive hi-cap mags, and the safety is not as smooth feeling as a 1911 (which i am use to)
everything else makes the HK a nice shooting/handling firearm imo
XD: they are nice--only bad things are the crappy finish wearing (dont know if the newer ones have improved) and i dont like the slim lined grip safety; the trigger pull is consistant throughout and i like the grip angle and easy setup
another factor: one is made in Germany, the other in a 2nd world country, croatia (but i think SA still gives is a lifetime warrenty)--so quality manufacutring is also a thing to consider
shoot both (or at least hold em in you hand) and see which one fits YOU
good luck