Check out the Eberron Campaign Setting. It contains a new core class called the artificer, which has the ability to drain items to gain XP for creating new magic items. You could also just house rule in the ability (perhaps via a feat), with the benefits depending on what draining magical items achieves. What did you intend for it to allow the character to do?