Here you can find XML Update reference: http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-5-R2-SP1/XML-Update-Reference/
Try to use SetAttribute:
<setAttribute path="/configuration/epi:episerver/epi:urlRewrite" attributeName="defaultProvider" attributeValue="MyUrlRewriter" />
Perfect - Thanks Sergii - Exactly what I was looking for.
The finished article (as simple as it is!)
<modifications> <!-- Add our own url rewriter --> <add path="/episerver/urlRewrite/providers"> <add name="MyUrlRewriter" description="My Url Rewriter Description" type="MyDll.MyUrlRewriter,MyDll" __keyAttributes="name" /> </add> <!-- set it to be the default --> <setAttribute path="/episerver/urlRewrite" attributeName="defaultProvider" attributeValue="MyUrlRewriter" /> </modifications>
After taking a look at the powershell scripts which perform the merge it tuned out I didnt need the namespacing either.
Im looking to create a episerver.config.xmlupdate file to be used for modifying some config settings. This can be executed through the EPi deployment center as part of a website installation process.
Specifically, I want to add an additional url rewriter and make it the default for the website.
Adding the additional provider is easy, but im stumped on how to change the defaultProvider attribute on the urlRewrite element.
Can anyone point me in the direction of some documentation around the syntax or an example of where this may have been done on a open source project?