Added basic xml encoding and decoding
Added proper xml decoding