Electronic structure of LaFeAsO1-xFx from x-ray absorption spectroscopy