Added Generic xml encoding (testing)