Magnetic structure of GdNi2B2C by resonant and nonresonant x-ray scattering.