The demonstration of a compact imaging X-ray spectrometer (D-CIXS), which flew on ESA's SMART-1 mission to the Moon (Racca et al., 2001; Foing et al., 2006), was designed to test innovative new technologies for orbital X-ray fluorescence spectroscopy. D-CIXS conducted observations of the lunar surface from January 2005 until SMART-1 impacted the Moon in September 2006. Here, we present scientific observations made during two solar flare events and show the first detection of Titanium Kα from the lunar surface. We discuss the geological implications of these results. We also discuss how experience from D-CIXS has aided the design of a similar instrument (Chandrayaan-1 X-ray Spectrometer (C1XS)) that was launched on the 22nd October 2008 on India's Chandrayaan-1 mission to the Moon.