Technically Beguilers & Warmages can use the feat Extra Spell from Complete Arcane to learn any spell, be it Divine or Arcane and be able to cast it.
Both the Beguiler and the Warmage under the Spells section of their Class Features have a line that says:
Essentially, his {the Warmage and Beguiler} spell list is the same as his spells known list.
The poor Dread Necromancer, which I think most will agree is a caster of a similiar stripe to the Beguiler and Warmage, lacks that line in its class description.
So going completely by RAW, Beguilers and Warmages can use the Extra Spell Feat to learn any spell, subject to the limitations of the Extra Spell Feat,(spell must be one level lower than highest level of spell you can currently cast).
Both the Beguiler and the Warmage under the Spells section of their Class Features have a line that says:
Essentially, his {the Warmage and Beguiler} spell list is the same as his spells known list.
The poor Dread Necromancer, which I think most will agree is a caster of a similiar stripe to the Beguiler and Warmage, lacks that line in its class description.
So going completely by RAW, Beguilers and Warmages can use the Extra Spell Feat to learn any spell, subject to the limitations of the Extra Spell Feat,(spell must be one level lower than highest level of spell you can currently cast).