Incremental computation has been broadly applied in computer software field, but it needs complex algorithm design and tough software maintenance. We develop an XQuery incremental computation program automatic generation method according to the characteristics of XQuery language. This method can implement program transformation, generate incremental computation program code automatically in light of the input data modification of this computation, and obtain new result based on the original one. The execution performance of the incremental computation program is better than that of recomputation.