How can i read XML data dynamically? How can I manage my C# code as generic and dynamic as possible? Based on the requirements I will need to add further folder paths in Xml, which should not affect the written code in a way that it has to be rewritten..
Given a piece of XML as sample:
<?xml version="1.0" standalone="yes"?>
<HOSTS>
<Host id = '1'>
<Extension>txt</Extension>
<FolderPath>C:/temp</FolderPath>
</Host>
<Host id = '2'>
<Extension>rar</Extension>
<FolderPath>C:/Sample</FolderPath>
</Host>
</HOSTS>
How can I read the host id dynamically? What possibilities do I have?