Take a good hard look at the experience bar and tell me what purpose it serves. Stuck? Allow me to explain.
The enchantment table takes this essence from you to enhance objects magically. I know it's awesome right? See The "Experience Bar" is not really named correct in my opinion. At it's core, it's a glorified magic meter. So why not use it as such?
When you go out of your way to make mods that introduce spells to minecraft, consider using the experience bar to be the focal point of this. All mobs, neutral and foe, drop experience, so it would not be difficult to build a magic system around the experience bar. I mean, Enchantment is a form of magic anyway, right?
Well, who said the spells have to cost a full level to use? I'm going to take into consideration the Legend of Zelda here.
Most spells were really cheap to use, except Din's Fire, Nayru's Love, and Farore's Wind, and Medalions from LTTP. Any game with a Magic Meter had spells that varied in cost. Each level has a varyingly larger bar, but the experience is still the same units.
There would obviously be spells of varying lengths and costs, each worth only several units of experience. With monsters all dropping experience, it would be easy to obtain it. It's really up to the mod maker to balance it out, however.