  Soft X-ray absorption and emission measurements are performed for the K- edge
of B in MB$_2$ (M=Mg, Al, Ta and Nb). Unique feature of MgB$_2$ with a high
density of B 2$p_{xy}(\sigma)$-state below and above the Fermi edge, which
extends to 1 eV above the edge, is confirmed. In contrast, the B 2$p$ density
of states in AlB$_2$ and TaB$_2$, both of occupied and unoccupied states,
decreased linearly towards the Fermi energy and showed a dip at the Fermi
energy. Furthermore, there is a broadening of the peaks with
$p\sigma$-character in XES and XAS of AlB$_2$, which is due to the increase of
three dimensionality in the $p\sigma$-band in AlB$_2$. The DOS of NbB$_2$ has a
dip just below the Fermi energy. The present results indicate that the large
DOS of B-2$p\sigma$ states near the Fermi energy are crucial for the
superconductivity of MgB$_2$.
