Measurements of g factors of Xe and Kr