title: Parsing Xml with element tree in Python, same tag name
body: <p>I'm using python to parse a XML file but I have a problem. I'm sure there is a way to solve it but I'm new on python and parsing xml... </p>
  
  <p>So here a example of xml : </p>
  
  <pre><code>&lt;TeamData Ref = "1"&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
  &lt;/TeamData&gt;
  &lt;TeamData Ref = "2"&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
      &lt;Goal&gt;&lt;/Goal&gt;
  &lt;/TeamData&gt;
  </code></pre>
  
  <p>I want to store my element goal in two part in function of the team ref... How would I do that ? Because I tried : </p>
  
  <pre><code>for iterators in child.iter("TeamData"):
                  something_to_store(iterators.tag)
  </code></pre>
  
  <p>But I have the list of all the 8 goals without difference in function of the teamdata ref ! </p>