Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web.config transformation and the location element

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

<configuration>
<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

like image 741
Chaos Avatar asked Feb 25 '23 13:02

Chaos


1 Answers

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.

like image 85
friism Avatar answered Mar 19 '23 06:03

friism