小编Ole*_*kyy的帖子

xdt with powershell

实际上我对xtd-transform没有太多了解.我需要的xdt文件:

<add key="EndpointName" value="SomeValue" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)" />
Run Code Online (Sandbox Code Playgroud)

我在powershell中做的例行工作:

$cache.SetAttribute("key","EndpointName")
$cache.SetAttribute("value","SomeValue")
$cache.SetAttribute("xdt:Transform","SetAttributes(value)")
$cache.SetAttribute("xdt:Locator","Match(key)")
Run Code Online (Sandbox Code Playgroud)

这就是我所拥有的.不符合我的观点:

<add key="EndpointName" value="Email" Transform="SetAttributes(value)" Locator="Match(key)" />
Run Code Online (Sandbox Code Playgroud)

那么可以使用powershell脚本创建xdt:attribute吗?

多谢你们!

xml powershell xdt-transform

3
推荐指数
1
解决办法
762
查看次数

标签 统计

powershell ×1

xdt-transform ×1

xml ×1