Extract XML helpers into own file.