  We consider a closed set S in R^n and a linear operator \Phi on the
polynomial algebra R[X_1,...,X_n] that preserves nonnegative polynomials, in
the following sense: if f\geq 0 on S, then \Phi(f)\geq 0 on S as well. We show
that each such operator is given by integration with respect to a measure
taking nonnegative functions as its values. This can be seen as a
generalization of Haviland's Theorem, which concerns linear functionals on
polynomial algebras. For compact sets S we use the result to show that any
nonnegativity preserving operator is a pointwise limit of very simple
nonnegativity preservers with finite dimensional range.
