X-ray absorption spectroscopy (XAS) is ideal for {ital in}{ital situ} studies of battery materials because both the probe and signal are penetrating x rays. The advantage of XAS being element specific permits investigation of the environment of a constituent element in a composite material. This makes it very powerful for studying electrode additives and corrosion of individual components of complex metal hydride alloys. The near edge part of the spectrum (XANES) provides information on oxidation state and site symmetry of the excited atom. This is particularly useful in study of corrosion and oxidation changes in cathode materials during charge/discharge cycle. Extended fine structure (EXAFS) gives structural information. Thus the technique provides both chemical and structural information. Since XAS probes only short range order, it can be applied to study of amorphous electrode materials and electrolytes. This paper discusses advantages and limitations of the method, as well as some experimental aspects