The purpose of the D-CIXS (Demonstration of a Compact Imaging X-ray Spectrometer) instrument on the ESA SMART-1 mission is to provide high quality spectroscopic mapping of the Moon by imaging fluorescence X-rays emitted from the lunar surface. In order to obtain adequate statistics for what can be very weak sources, it is essential to have a large effective area, while maintaining a low mass. The solution is to make a thin, low profile detector, essentially a modern version of "X-ray detecting paper". D-CIXS will achieve a spatial resolution on the ground of 42km from a spacecraft at 300 km altitude, with a spectral resolution of 200 eV or better. The instrument is based around the use of advanced dual microstructure collimator and Swept Charge Device X-ray detector technologies. Swept Charge Device X-ray detectors, a novel architecture based on proven CCD technology, have the virtue of providing superior X-ray detection and spectroscopic measurement capabilities, while also operating at room temperature. Thus we avoid the need for the large passive cooling radiator that was previously required to cool large X-ray focal plane CCDs. The advanced low profile microstructure collimation and filter design builds on expertise developed in solid state and microwave technology to enable us to dramatically reduce the instrument mass. The total mass of D-CIXS, including an X-ray solar monitor is 4.6 kg. D-CIXS will provide the first global map of the Moon in X-rays. During normal solar conditions, it will be able to detect absolute elemental abundances of Fe, Mg, Al and Si on the lunar surface, using the on-board solar monitor to obtain a continuous measurement of the input solar spectrum. During solar flare events, it will also be possible to detect other elements such as Ca, Ti, V, Cr, Mn, Co, K, P and Na. The global mapping of Mg, Al and Si, and in particular deriving Mg#, the magnesium number (MgO/[MgO+FeO]), represents the prime goal of the D-CIXS experiment.