Example 1: XML Document Transformation (XDT)

Consider a scenario where a user needs to modify the file OAuthServer\Web.config and wants to add an attribute to the oauth Tag in which the value of the configSource attribute is equal to OAuth.config.

  1. Create a file OAuthServer\Web.config in the TransformationsofConfigFiles folder according to XDT rules.
  2. Fill it in according to the XDT rules.
  3. Commit the changes.
  4. The Transformation is reflected in OAuthServer\Web.config after the next Deployment. Next time, the config file should give the same result as after the first application of the Transformation.
  5. Sample XML Transformation:
```xml

<?xml version="1.0"?>

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">

    <oauth configSource="OAuth.config" yourNewAttribute="value" xdt:Transform="SetAttributes" xdt:Locator="Match(configSource)" />

</configuration>