X-ray resonant powder diffraction