Mechanism studies of water electrocatalysis reactions via In situ X-ray absorption spectroscopy