System.Configuration with XSL or XInclude

  • Thread starter Thread starter Mike Blake-Knox
  • Start date Start date
M

Mike Blake-Knox

I would like to have my application configuration data split so that
application specific information is stored in one XML file while user
specific information is stored in a separate file.

Is there a way to use either XInclude or an XSL stylesheet to merge the
data and still use System.Configuration.ConfigurationSettings.GetConfig
to access the data?

Thanks.

Mike Blake-Knox
 
I know of no built-in way of doing this, but it would be fairly simple to define a custom config handler to accomplish it

IConfigurationSectionHandler defines only one method, Create, which return an object. You could retrieve the path to your satellite file from the main config file, load the data you need from the satellite file and fetch it via ConfigurationSettings.GetConfig("MySection").
 
Back
Top