I have a custom section in my web.config file similar to this structure:
<Messages> <Message id="1'> <Property Name="foo" value="bar" /> </Message> <Message id="2'> <Property Name="foo" value="bar2" /> </Message> </Messages>
I want to apply a custom conversion to it to change the value of ALL instances of the Property element using Name = "foo" - but I can't get it to work.
I tried:
<Messages> <Message> <Property Name="foo" value="updated" xdt:Locator=Match(Name) xdt:Transform="Replace" /> </Message> </Mesasges>
I can remove all elements by replacing Transform = Replace with Transform = RemoveAll - any ideas how I can achieve something similar to replace all values?
source share