Print XML tag attributes using element tree
<p>I'm using following statements to print the value of Title tag. Its working fine. But I'm also want to print <code>&lt;page id='...' .......</code> Is it possible? thanks</p>

<pre><code>            &lt;mediawiki&gt;
          &lt;siteinfo&gt;
            &lt;sitename&gt;Wiki&lt;/sitename&gt;
            &lt;namespaces&gt;
              &lt;namespace key="-2" case="first-letter"&gt;Media&lt;/namespace&gt;
            &lt;/namespaces&gt;
          &lt;/siteinfo&gt;
        &lt;page id="31239628" orglength="6822" newlength="4524" stub="0" categories="0" outlinks="1" urls="10"&gt;
        &lt;title&gt;Title&lt;/title&gt;
        &lt;categories&gt;&lt;/categories&gt;
        &lt;links&gt;15099779&lt;/links&gt;
        &lt;urls&gt;
        &lt;/urls&gt;
        &lt;text&gt;

        Books

        &lt;/text&gt;
        &lt;/page&gt;

        &lt;/mediawiki&gt;
</code></pre>

<p>Here is my working code. Which print the title tag values.</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>
