Comparison of surface oxidation of titanium nitride and chromium nitride films studied by x-ray absorption and photoelectron spectroscopy