Making xml export work