  We present a comprehensive study of X-ray emission and wind properties of
massive magnetic early B-type stars. Dedicated XMM-Newton observations were
obtained for three stars xi1 CMa, V2052 Oph, and zeta Cas. We report the first
detection of X-ray emission from V2052 Oph and zeta Cas. The observations show
that the X-ray spectra of our program stars are quite soft. We compile the
complete sample of early B-type stars with detected magnetic fields to date and
existing X-ray measurements, in order to study whether the X-ray emission can
be used as a general proxy for stellar magnetism. We find that hard and strong
X-ray emission does not necessarily correlate with the presence of a magnetic
field. We analyze the UV spectra of five non-supergiant B stars with magnetic
fields by means of non-LTE iron-blanketed model atmospheres. The latter are
calculated with the PoWR code, which treats the photosphere as well as the the
wind, and also accounts for X-rays. Our models accurately fit the stellar
photospheric spectra in the optical and the UV. The parameters of X-ray
emission, temperature and flux are included in the model in accordance with
observations. We confirm the earlier findings that the filling factors of X-ray
emitting material are very high. Our analysis reveals that the magnetic early
type B stars studied here have weak winds. The mass-loss rates are
significantly lower than predicted by hydrodynamically consistent models. We
find that, although the X-rays strongly affect the ionization structure of the
wind, this effect is not sufficient in reducing the total radiative
acceleration. When the X-rays are accounted for at the intensity and
temperatures observed, there is still sufficient radiative acceleration to
drive stronger mass-loss than we empirically infer from the UV spectral lines.
(abridged)
