The magnetic structure of multiferroic RMn2O5 (R=Y,Er) has been investigated by means of resonant soft x-ray diffraction. Energy, temperature and azimuthal angle scans were performed in addition to reciprocal space maps on the magnetic reflection in the different magnetic phases of YMn2O5. We also investigated the orbital magnetic moment at the oxygen K-edge for RMn2O5 with both, R= Y and Er compositions. These moments reflect the strong hybridization between Mn 3d and oxygen 2p states. Experiments with applied electric fields are additionally presented, showing that the helical component of the magnetic structure in the CM phase of YMn2O5 can be reversed by the application of an electric field. However, the incommensurate magnetic reflection in the high temperature phase is unaffected. Interestingly, this is observed only in the presence of a small electrical current, indicative of a current induced/enhanced switching of magnetic domains.