Helo
Can anybody explain me how to get configuration element from .config file. I know how to handle attributes but not elements. As example, I want to parse following:
<MySection enabled="true">
<header><![CDATA[ <div> .... </div> ]]></header>
<title> .... </title>
</MySection>
My c# code looks like this so far:
public class MyConfiguration : ConfigurationSection
{
[ConfigurationProperty("enabled", DefaultValue = "true")]
public bool Enabled
{
get { return this["enabled"].ToString().ToLower() == "true" ? true : false; }
}
[ConfigurationProperty("header")]
public string header
{
???
}
}
It works with attributes, how do I do with elements (header property in above code) ?