added xml handling to validator