Python XML parsing on different levels

buzkalpli

New Member
I am trying to use Python to parse an XML with the same name tags on different levels. I searched a lot trough the documentation and other StackOverflow answers but I couldn't find a suitable solution.The XML looks like this:\[code\]<configuration> <applications> <application> <name>name1</name> <protocol>protocol1</protocol> <port>port1</port> </application> <application> . </application> <application-set> <name>appset_name1</name> <application> <name>appname1</name> </application> </application-set> <application-set> . </application-set> </applications></configuration>\[/code\]I need to take the name, protocol and port from the application tag on 3rd level and name and other application name from the application-set tag on the 3rd level (could be in a simple list)Thx
 
Back
Top