a lot comes down to personal preference and what you are looking for.
the xd will obviously be lighter and hold more ammunition. the beretta will probably recoil less due to its added weight and it has a true manual safety/decocker which some people like a lot.
as to reliability, they are probably pretty close. as someone already mentioned, go down to the store and handle both of them, see which one you like most.
in my personal opinion, i think most shooters will probably go with the XD.
for me personally, i would go with the beretta.