Simple inorganic barium compounds are difficult to study spectroscopically in the surface sensitive soft X-ray regime due to significant surface contamination that can dominate the spectra. Here we present a near-edge X-ray absorption (NEXAFS) and X-ray photoelectron spectroscopic (XPS) study of four barium compounds: BaO, Ba(OH)2, BaCO3, and Ba(NO3)2. Using an ambient-pressure XPS instrument we prepared thin film samples in situ, which provided a high degree of control over the surface chemistry and significantly reduced the amount of contamination. The O K-edge spectrum for BaO presented here is in excellent agreement with the latest calculations in the literature, and indicates that experimental spectra in the literature for this compound may have suffered from carbonate contamination.