Comparison of x-ray absorption with x-ray photoemission of nickel dihalides and nio