Added XML to KV conversion