Electrochemical and Structural Analysis of Li-ion battery Materials by in-situ X-ray Absorption Spectroscopy.