I am considering the nuclei as solid particles and the electrons as waves creating clouds of electron density around the nuclei. Thinking of it like this, I can't see how X rays are diffracted by the electron clouds and not nuclei. Perhaps I am thinking about this wrong and the wave-like nature of the nucleus comes into play here?
EDIT: I had an idea, but I am not sure it is correct at all. To be honest I haven't yet thought about what it means for any of these quantum particles to be a 'barrier' to the X-rays, which is probably the starting point. I'm I correct in thinking that a region acts as a 'gap' if it doesn't interact significantly with the X--rays, and a region can be thought of as a barrier if it does, e.g. by repeated absorption of X-rays and emission in different direction etc.
I did a quick calculation using some random values for nuclear energy levels and electron energy levels (not sure what elements/isotopes I was looking at, but I don't think it really matters here) and I got that the greatest energy gap for a nuclear energy level (between n=1 and n=2) was about 7x10(-13)J whereas X-ray energy is about 5x10(-15)J, and electron energy level is on the order of 10(-15)J (again looking at the greatest energy gap transition n=1 to n=2). Perhaps the X-rays are diffracted around the electron density because the electrons interact with the X-rays but the interaction of X-rays with nuclei is minimal because of their different energy levels, so it is the elctrons that act as the barrier and the X-rays generally pass trhough the nuclei without interaction?