xml creation is now generic