【发布时间】:2012-09-06 21:04:48
【问题描述】:
我正在尝试使用 Web Deploy 3.0 在部署之前对我的 web.config 进行更改。假设我有以下 xml:
<node>
<subnode>
<connectInfo httpURL="http://LookImAUrl.com" />
</subnode>
<node>
我想只匹配“http://...”中的“http”,这样我就可以用 https 替换它。
我研究了 XPath 字符串函数并理解了它们——我只是不知道如何将它们放在表达式的中间,例如:
"//node/subnode/connectInfo/@httpURL/substring-before(../@httpURL,':')"
这基本上是我想做的,但看起来不太对。
【问题讨论】:
-
您的表达式在 XPath 2.0 中很好,但在 XPath 1.0 中不行。
标签: xpath web-deployment webdeploy