1 Reply Latest reply on Jul 16, 2010 8:47 AM by Adam Bowen

    Populating values in xml file from custom property instances

    Naveen Anne

      I have a very unique use case. Here are the details:

       

      1. There is an xml file which has several (200) attributes. For example, datasource.xml and there are two attributes in it called:

      <Driver><VALUE1></Driver>

      <Instance><VALUE2></Instance>

       

      2. The above xml file exists across all environments i.e. Preprod, Prod, QA, Dev, Support etc.

       

      3. Every environment has a custom property class and each server within an environment will have its own instance of the custom property class. These instances will contain the values for all attributes that are part of the xml file. For example,

      Under Prod class, there are two custom property instances Prod1 and Prod2.

      Prod1 will have a value for DRIVER property and a value for INSTANCE property

      Prod2 will have a value for DRIVER property and a value for INSTANCE property.

       

      4. The requirement is to read the values of properties from custom instances, populate the xml file and deploy it to that server i.e. for Prod1, read DRIVER value and INSTANCE value from Prod1`s custom property instance, populate the xml file and deploy it to a certain location in Prod1.

       

      Any ideas how to accomplish this?

      Thanks

      Naveen