gpt4 book ai didi

xml - 如何使用现有的 Nant 或 Nant Contrib 任务附加 XML 节点?

转载 作者:数据小太阳 更新时间:2023-10-29 02:23:11 25 4
gpt4 key购买 nike

在使用 Nant 的构建过程中,如何更新 xml 文件以添加新节点。我希望通过使用现有的 Nant/NantContrib 任务来做到这一点

最佳答案

这是一篇详细解释的文章:http://weblogs.asp.net/bsimser/archive/2008/01/03/appending-nodes-in-xml-files-with-xmlpeek-and-xmlpoke-using-nant.aspx

基本上...

  1. 使用xmlpeek 将您要追加的节点加载到变量中
  2. 将您的新节点(作为字符串)附加到第 1 步中的变量
  3. 使用xmlpoke替换第一步选择的节点

    "/>

关于xml - 如何使用现有的 Nant 或 Nant Contrib 任务附加 XML 节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1366233/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com