这篇文章详细解释了以下内容:http://weblogs.asp.net/bsimser/archive/2008/01/03/appending-nodes-in-xml-files-with-xmlpeek-and-xmlpoke-using-nant.aspx 基本上,您需要执行以下步骤来使用xmlpeek和xmlpoke将节点添加到XML文件中:1.使用xmlpeek将要附加到变量中的节点加载到变量中。2.将新节点(作为字符串)附加到步骤1中的变量中。3.使用xmlpoke替换步骤1中选择的节点。