XPS (X-ray photoelectron spectroscopy) is a surface analysis technology, which is widely used in materials science, chemistry, biology and other fields. XPS is an effective method to detect halogen peaks. First of all, halogen elements have high sensitivity. XPS is highly sensitive to halogen elements and can effectively detect the presence of halogen elements. Secondly, XPS has high resolution. It can clearly distinguish the photoelectron peaks of different elements, including those of halogen elements. Finally, XPS can also provide chemical state information of elements. By analyzing the energy position and shape of photoelectron peak, the chemical state of elements and their distribution in samples can be determined.