Polarization-dependent x-ray absorption spectroscopy at the B 1s edge of single-crystalline Mg(x)Al(1-x)B(2) reveals a strongly anisotropic electronic structure near the Fermi energy. Comparing spectra for superconducting compounds (x=0.9, 1.0) with those for the non-superconductor x=0.0 gives direct evidence on the importance of an in-plane spectral feature crossing E_F for the superconducting properties of the diborides. Good agreement is found with the projected B 2p density of states from LDA band structure calculations.