Electronic structure of K2PdCl6 and K2PdCl4 from X-ray spectral data