How to read the values from the config file which is in XML format looks below.here the tags name1,name2 will increase like name4,name5...
<config>
<name>
<name1>xxxxxxxxx</name1>
<name2>yyyyyyyyy</name2>
<name3>zzzzzzzzz</name3>
</name>
<company>
<loc1>1234</loc1>
<loc2>1242</loc2>
<loc3>1212</loc3>
</company>
</config>
ElementTreeandlxmlare well-suited for the task.