title: Getting all instances of child node using xml.etree.ElementTree
body: <p>I have the following XML file as input:</p>
  
  <pre><code>&lt;Test&gt;
    &lt;callEvents&gt;
      &lt;moc&gt;
        &lt;causeForTermination&gt;0&lt;/causeForTermination&gt;
        &lt;serviceCode&gt;
          &lt;teleServiceCode&gt;11&lt;/teleServiceCode&gt;
        &lt;/serviceCode&gt;
        &lt;dialledDigits&gt;5555555&lt;/dialledDigits&gt;
        &lt;connectedNumber&gt;77777&lt;/connectedNumber&gt;
      &lt;/moc&gt;
  
      &lt;moc&gt;
        &lt;causeForTermination&gt;0&lt;/causeForTermination&gt;
        &lt;serviceCode&gt;
          &lt;teleServiceCode&gt;11&lt;/teleServiceCode&gt;
        &lt;/serviceCode&gt;
        &lt;dialledDigits&gt;2222222&lt;/dialledDigits&gt;
      &lt;/moc&gt;
    &lt;/callEvents&gt;
    &lt;callEventsCount&gt;100&lt;/callEventsCount&gt;
  &lt;/Test&gt; 
  </code></pre>
  
  <p>I want to output all the values for dialledDigits. However, my code only displays the first instance of dialledDigits.</p>
  
  <pre><code>dialledDigits {} 5555555
  </code></pre>
  
  <p>My desired output should contain both instances.</p>
  
  <pre><code>dialledDigits {} 5555555
  dialledDigits {} 2222222
  </code></pre>
  
  <p>Here is my code</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  tree = ET.parse('as.xml')
  root = tree.getroot()
  callevent=root.find('callEvents')
  
  Moc1=callevent.find('moc')
  
  for node in Moc1.getiterator():
      if node.tag=='dialledDigits':
          print node.tag, node.attrib, node.text
  </code></pre>