Thiophene-containing organometallic polymers studied by near-edge X-ray absorption spectroscop