Diffraction anomalous fine structure (DAFS) is the fine structure in the intensity of an X-ray diffraction peak in the vicinity of an absorption edge. DAFS is measured by monitoring the intensity of a diffraction peak as a function of the incident X-ray energy as it is scanned through an absorption edge. It combines the short range structural sensitivity of X-ray absorption spectroscopy with the long range periodicity of X-ray diffraction, and can provide structural information which is not available from these techniques alone, or in combination. We present a methodology which allows extraction of a specific X-ray absorbance spectrum from the DAFS spectrum, and illustrate it for KMnO4. We also demonstrate the ability of DAFS to separate the contributions to the X-ray absorption spectrum of the tetrahedral and octahedral cobalt sites in the spinel Co3O4.