added xml debug mode accessable by setting debug[xml] as GET in URL