<?xml version="1.0" ?>
<Data>
<Channels>
<channel0 ChannelName="Name1" />
<channel1 ChannelName="Name2" />
<channel2 ChannelName="Name3" />
</Channels>
</Data>
For some reason when I parse this from the xml file which has the above data in it, I only get it to print out channel0 Name1, it skips out the rest of the channels. Not sure if I'm missing something, or if I made a mistake. Could someone help me out? Thanks!
root = et.parse(path).getroot()
for child in root:
for element in child:
print element.tag, element.attrib['ChannelName']