XRD is the elastic scattering of X-rays and si no absorption of energy occurs but a directional scattering the output is therefore number of X-ray counts with diffraction angle.
EDX is energy dispersion X-ray spectroscopy. This an an absorption of X-ray by electron in atoms which emits and X-ray at a different energy when electron returns to the ground state. The output is the number of excited X-ray with energy, usually eV.
The physical characterizations of the above measurements are different. XRD measurement will give you the quality of crystal using the low FWHM (in arcses) of peaks and its high intensity, While EDS will give the composition analysis and variation along the growth axis. Normally for high quality crystal variation should be
As said above, XRD gives the information about crystal structure of the material based on the scattering amplitude of the incident probing x-ray beam. Scattering amplitude being function of crystal structure factor contains information about the crystal structure. On the other hand, EDX is used for elemental analysis of the sample depending upon the re-emitted photon energy upon x-ray absorption. Generally XPS is used for elemental analysis due to its better accuracy.
Energy Dispersive X-ray Analysis (EDX) can be used to investigate the properties and compositions of a broad range of sample types. EDX is used for chemical identification of elements and their concentration.
X-Ray Diffraction (XRD) is used for Phase identification. It is used to identify spatial arrangements of atoms in crystalline phases.
In EDX, electrons knock out electrons from atoms, producing X-rays of characteristic wavelength. These X-Rays are then detected to identify the element from which they were produced. In XRD, X-rays of known wavelength are used to probe the structure of the material, using the lattice as a diffraction grating.
To perform an EDX you need an electron source. For XRD you need an X-ray source.
If you are looking for chemical composition, concentration gradients, or solute segregation, use EDX.
If you are looking for phase distribution, lattice strain fields or stored defect content, use XRD.