title: Python: Multiple printing in ElementTree
body: <p>I have multiple address and settingname as shown in xml code below:</p>
  
  <pre><code>&lt;Settings&gt;
     &lt;Setting&gt;                  
        &lt;Address&gt;15:0&lt;/Address&gt;
        &lt;Comments /&gt;
        &lt;Conditions /&gt;
        &lt;IsSingleEnded&gt;true&lt;/IsSingleEnded&gt;
        &lt;IsVisibilityExternal&gt;false&lt;/IsVisibilityExternal&gt;
        &lt;MetaDatas /&gt;
        &lt;SettingName&gt;123&lt;/SettingName&gt;
     &lt;/Setting&gt;
     &lt;Setting&gt;                  
        &lt;Address&gt;18:0&lt;/Address&gt;
        &lt;Comments /&gt;
        &lt;Conditions /&gt;
        &lt;IsSingleEnded&gt;true&lt;/IsSingleEnded&gt;
        &lt;IsVisibilityExternal&gt;false&lt;/IsVisibilityExternal&gt;
        &lt;MetaDatas /&gt;
        &lt;SettingName&gt;abc&lt;/SettingName&gt;
     &lt;/Setting&gt;
  &lt;/Settings&gt;
  </code></pre>
  
  <p>I would like to print all the SettingName and Address.
  Here is my code:</p>
  
  <pre><code>from xml.etree import ElementTree
  
  with open('abc.xml', 'rt') as f:
      tree = ElementTree.parse(f)
  
      for name in tree.findall('.//SettingName'):
          for address in tree.findall('.//Address'):
              name1 = name.text
              address1 = address.text
              if name1 and address1:
                  print name1, address1
  </code></pre>
  
  <p>In the end, it print multiple times of the settingname and address. What i want is one settingname have one address and it keep printing until finish printing all the settingname.
  May i know how can i fix it through my code?</p>