In situ X-ray near-edge absorption spectroscopy investigation of the state of charge of all-vanadium redox flow batteries.