开发者

web.config transformation and the location element

开发者 https://www.devze.com 2023-02-23 20:36 出处:网络
I cannot seem to work out how you would change the following <configuration> &l开发者_开发百科t;location path=\"hello123\">

I cannot seem to work out how you would change the following

<configuration>
&l开发者_开发百科t;location path="hello123">
<.../>
</location>
</configuration>

to

<configuration>
<location path="world321">
<.../>
</location>
</configuration>

without removing the first and adding the second. Any help with this would be great.

Thanks


You can use SetAttributes, like this:

<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <location path="world321" xdt:Transform="SetAttributes(path)" >
  </location>
</configuration>

You can test this and other transformations on the AppHarbor web.config transformation tester.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号