As a spectroscopic technique, x-ray absorption near-edge structure (XANES) of core-levels using synchrotron radiation is in wide-spread use for the determination of the molecular composition of solid surfaces. A common detection method measures the yield of secondary electrons, which is proportional to the x-ray absorption coefficient for sufficiently high photon energy. In the experiments reported here, we show how the secondary electrons emitted as a result of photoabsorption can be used to generate a magnified image of the sample surface, with fundamental spatial limits determined by the deBroglie wavelength of the emitted electrons. Contrast in the secondary electron spatial distribution contains both topographical and chemical information about the sample surface. The use of tunable synchrotron radiation enables us to separate these contributions to the microscopic image, and to spatially resolve surface chemical composition as reflected in micro-XANES spectra.