xml encoding, how does it work?