title: Reading XML file tags
body: <p>I want to read the tag values like <code>&lt;title&gt;</code>,<code>&lt;title_id&gt;</code> from xml file. The value of <code>&lt;title&gt;</code> read successfully. Is it possible to read the <code>&lt;title&gt;</code>,<code>&lt;title_id&gt;</code> with same loop?<br>
   Please help me I'm new to XML.</p>
  
  <pre><code>        &lt;mediawiki xmlns="http://www.mediawiki.org/xml/export-0.5/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.5/ http://www.mediawiki.org/xml/export-0.5.xsd" version="0.5" xml:lang="en"&gt;
        &lt;siteinfo&gt;
          &lt;sitename&gt;Wiki&lt;/sitename&gt;
          &lt;case&gt;first-letter&lt;/case&gt;
          &lt;namespaces&gt;
            &lt;namespace key="0" case="first-letter" /&gt;
          &lt;/namespaces&gt;
        &lt;/siteinfo&gt;
        &lt;page&gt;
          &lt;title&gt;Sex&lt;/title&gt;
          &lt;title_id&gt;31239628&lt;/title_id&gt;
          &lt;revision&gt;
            &lt;id&gt;437708703&lt;/id&gt;
            &lt;timestamp&gt;2011-07-04T13:53:52Z&lt;/timestamp&gt;
            &lt;text xml:space="preserve" bytes="6830"&gt;{{ Hello}}
  
      &lt;/text&gt;
          &lt;/revision&gt;
        &lt;/page&gt;
      &lt;/mediawiki&gt;
  </code></pre>
  
  <p>I'm using following code to read all the title from file. And its working fine.</p>
  
  <pre><code>import xml.etree.cElementTree as etree
  tree = etree.parse('find_title.xml')
  for value in tree.getiterator(tag='title'):
      print value.text
  </code></pre>