A novel electrochemical setup has been developed for soft X-ray absorption studies of the electronic structure of electrode materials during electrochemical cycling. In this communication we illustrate the operation of the cell with a study of the corrosion behavior of copper in aqueous NaHCO3 solution via the electrochemically induced changes of its electronic structure. This development opens the way for in situ investigations of electrochemical processes, photovoltaics, batteries, fuel cells, water splitting, corrosion, electrodeposition, and a variety of important biological processes.