LargePrime is right, energy drain is not negative levels. They have separate entries in the PHB glossary. The entry for negative levels starts:
"A loss of vital energy resulting from energy drain, spells, magic items, or magical effects."
Thus, it is a different thing from energy drain (which is specified as "an attack" in its glossary entry), and can be caused by other things.
But, Undead are immune to energy drain, and every spell I know of that causes negative levels instead specifies it buffs undead (though there may be a spell out there that can harm undead), and most "magical effects" are going to allow a Fort save, in which case the undead would be immune (you can't level drain an object).
So, it seems magical items of an opposed alignment are the only readily apparent way to inflict negative levels on an undead (at least, within core).