title: Specifying xml parsing with multiple roots having the same name using etree
body: <p>I'm using xml.etree.ElementTree to parse an xml file in the form-</p>
  
  <pre><code>&lt;element&gt; 
     &lt;status&gt;OK&lt;/status&gt; 
     &lt;duration&gt; 
      &lt;value&gt;340110&lt;/value&gt; 
      &lt;text&gt;3 jours 22 heures&lt;/text&gt; 
     &lt;/duration&gt; 
     &lt;distance&gt; 
      &lt;value&gt;1734542&lt;/value&gt; 
      &lt;text&gt;1 735 km&lt;/text&gt; 
     &lt;/distance&gt; 
    &lt;/element&gt; 
  </code></pre>
  
  <p>I am then separating out the time values and comparing them to get the smallest possible value. However, I'm not sure how to do this without also ending up getting the distance value, which messes up my dataset. This is the code I have so far for fetching anything under the values root-</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  times=[]
  for i in htmlSource:
      root=ET.fromstring(i)
      for value in root.iter('value'):
          times.append(value.text)
  </code></pre>
  
  <p>Is there a way I can modify this to only get the values under duration and not distance? Thank you in advance.</p>