Whats your experience level?
I have a XD40SC. I would not recommend it (in .40 S&W) as a first pistol. It's small with a fairly heavy recoil for it's size. Not a recipe for a happy novice. That said, it is accurate and reliable.
In 9 mm it's very likely much more manageable.
Of course, if you're an old hand with pistols, get whatever floats your boat.