X-ray spectromicroscopy studies of polymer microstructure