Understanding the structure-performance relationship of carbon-based photocatalysts by soft X-ray spectroscopy