Both happen. Which one is predominant depends on the molecule, energy of xrays, amount of xrays, etc. Change in oxidation states in an atom is not unusual, but often takes a large amount of xray energy.
Here is where a difference in analytical methods starts to show. I have analyzed calibration standards with no sign of chemical degradation for over a year by energy dispersive XRF (EDXRF). That same sample was analyzed by wavelength dispersive XRF (WDXRF) and dramatically discolored after the first run.
Generally speaking (as always, there are exceptions), WDXRF uses much higher power than EDXRF.