Added basic XML encoder