The transverse momentum (pT) differential cross section of the charm-strange baryon {Xi}_{mathrm{c}}^0 is measured at midrapidity (|y| < 0.5) via its semileptonic decay into e+Ξ−νe in pp collisions at sqrt{s} = 5.02 TeV with the ALICE detector at the LHC. The ratio of the pT-differential {Xi}_{mathrm{c}}^0 -baryon and D0-meson production cross sections is also reported. The measurements are compared with simulations with different tunes of the PYTHIA 8 event generator, with predictions from a statistical hadronisation model (SHM) with a largely augmented set of charm-baryon states beyond the current lists of the Particle Data Group, and with models including hadronisation via quark coalescence. The pT-integrated cross section of prompt {Xi}_{mathrm{c}}^0 -baryon production at midrapidity is also reported, which is used to calculate the baryon-to-meson ratio {Xi}_{mathrm{c}}^0 /D0 = 0.20 ± 0.04 {left(mathrm{stat}.right)}_{-0.07}^{+0.08} (syst.). These results provide an additional indication of a modification of the charm fragmentation from e+e− and e−p collisions to pp collisions.