Thursday, 16 October 2014

C#: Define custom configuration entities with the same nested element



Want to create the custom configuration section where I need to read the same nested element.


If you see in the below sample XML, the setting element can repeat to the nested level.


Would any body please tell me that how would I define the entity to read this kind of nested structure where nested element name is also same?


Note: Please make sure that the I need to read the collection of the same nested element which can be repeated multiple times. E.g. 'setting'



<customConfigSection>
<setting source="">
<setting from="web1" to="web2" source="" />
<setting from="web3" to="web4" source="" />
<setting from="web5" to="web5" source="" />
<setting from="web7" to="web6" source="" />
<setting from="domain2" to="" source="">
<setting from="web1" to="web2" source="" />
<setting from="web1" to="web2" source="" />
<setting from="web1" to="web2" source="" />
</setting>
<setting>
<customConfigSection>

No comments:

Post a Comment