Every Riemannian metric or Finsler metric on a manifold induces a spray via its geodesics. In this paper, we discuss several expressions for the X-curvature of a spray. We show that the sprays obtained by a projective deformation using the S-curvature always have vanishing X-curvature. Then we establish the Beltrami Theorem for sprays with X=0