added xml export
added XML export, safer