  PSR B0943+10 is a mode-switching radio pulsar characterized by two emission
modes with different radio and X-ray properties. Previous studies, based on
simple combinations of blackbody and power law models, showed that its X-ray
flux can be decomposed in a pulsed thermal plus an unpulsed non-thermal
components. However, if PSR B0943+10 is a nearly aligned rotator seen pole-on,
as suggested by the radio data, it is difficult to reproduce the high observed
pulsed fraction unless magnetic beaming is included. In this work we reanalyze
all the available X-ray observations of PSR B0943+10 with simultaneous radio
coverage, modeling its thermal emission with polar caps covered by a magnetized
hydrogen atmosphere or with a condensed iron surface. The condensed surface
model provides good fits to the spectra of both pulsar modes, but, similarly to
the blackbody, it can not reproduce the observed pulse profiles, unless an
additional power law with an ad hoc modulation is added. Instead, the pulse
profiles and phase-resolved spectra are well described using the hydrogen
atmosphere model to describe the polar cap emission, plus an unpulsed power
law. For the X-ray brighter state (Q-mode) we obtain a best fit with a
temperature kT~0.09 keV, an emitting radius R~260 m, a magnetic field
consistent with the value of the dipole field of 4x10^12 G inferred from the
timing parameters, and a small angle between the magnetic and spin axis,
$\xi$=5. The corresponding parameters for the X-ray fainter state (B-mode) are
kT~0.08 keV and R~170 m.
