Core's Ring of X-Ray Vision gives it for 10 minutes a day, plus extra with con damage. I know there's some ways of bypassing this (Shape Soulmeld (Strongheart Vest), being an undead or warforged) and plenty of ways to cure the damage, but I'm wondering if there's other ways of getting X-Ray Vision. RotS's Earthdreamer gives it but only does earth and stone.
On the PF side, I don't know of any PC friendly ways to bypass the ability damage. PF's Divine Anthology offers See Beyond, but that requires an expensive component for 30 seconds of vision. See Through Stone spell and the One Way Window also do this, but only for stationary objects of relatively large size.