title: Empty list returned from ElementTree findall
body: <p>I'm new to xml parsing and Python so bear with me. I'm using lxml to parse a wiki dump, but I just want for each page, its title and text.</p>
  
  <p>For now I've got this: </p>
  
  <pre><code>from xml.etree import ElementTree as etree
  
  def parser(file_name):
      document = etree.parse(file_name)
      titles = document.findall('.//title')
      print titles
  </code></pre>
  
  <p>At the moment titles isn't returning anything. I've looked at previous answers like this one: <a href="https://stackoverflow.com/questions/9112121/elementtree-findall-returning-empty-list">ElementTree findall() returning empty list</a> and the lxml documentation, but most things seemed to be tailored towards parsing HTML. </p>
  
  <p>This is a section of my XML:</p>
  
  <pre><code>&lt;mediawiki xmlns="http://www.mediawiki.org/xml/export-0.7/"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd" version="0.7" xml:lang="en"&gt;
    &lt;siteinfo&gt;
    &lt;sitename&gt;Wikipedia&lt;/sitename&gt;
  &lt;base&gt;http://en.wikipedia.org/wiki/Main_Page&lt;/base&gt;
  &lt;generator&gt;MediaWiki 1.20wmf9&lt;/generator&gt;
  &lt;case&gt;first-letter&lt;/case&gt;
  &lt;namespaces&gt;
    &lt;namespace key="-2" case="first-letter"&gt;Media&lt;/namespace&gt;
    &lt;namespace key="-1" case="first-letter"&gt;Special&lt;/namespace&gt;
    &lt;namespace key="0" case="first-letter" /&gt;
    &lt;namespace key="1" case="first-letter"&gt;Talk&lt;/namespace&gt;
    &lt;namespace key="2" case="first-letter"&gt;User&lt;/namespace&gt;
    &lt;namespace key="3" case="first-letter"&gt;User talk&lt;/namespace&gt;
    &lt;namespace key="4" case="first-letter"&gt;Wikipedia&lt;/namespace&gt;
    &lt;namespace key="5" case="first-letter"&gt;Wikipedia talk&lt;/namespace&gt;
    &lt;namespace key="6" case="first-letter"&gt;File&lt;/namespace&gt;
    &lt;namespace key="7" case="first-letter"&gt;File talk&lt;/namespace&gt;
    &lt;namespace key="8" case="first-letter"&gt;MediaWiki&lt;/namespace&gt;
    &lt;namespace key="9" case="first-letter"&gt;MediaWiki talk&lt;/namespace&gt;
    &lt;namespace key="10" case="first-letter"&gt;Template&lt;/namespace&gt;
    &lt;namespace key="11" case="first-letter"&gt;Template talk&lt;/namespace&gt;
    &lt;namespace key="12" case="first-letter"&gt;Help&lt;/namespace&gt;
    &lt;namespace key="13" case="first-letter"&gt;Help talk&lt;/namespace&gt;
    &lt;namespace key="14" case="first-letter"&gt;Category&lt;/namespace&gt;
    &lt;namespace key="15" case="first-letter"&gt;Category talk&lt;/namespace&gt;
    &lt;namespace key="100" case="first-letter"&gt;Portal&lt;/namespace&gt;
    &lt;namespace key="101" case="first-letter"&gt;Portal talk&lt;/namespace&gt;
    &lt;namespace key="108" case="first-letter"&gt;Book&lt;/namespace&gt;
    &lt;namespace key="109" case="first-letter"&gt;Book talk&lt;/namespace&gt;
  &lt;/namespaces&gt;
    &lt;/siteinfo&gt;
    &lt;page&gt;
      &lt;title&gt;Aratrum&lt;/title&gt;
      &lt;ns&gt;0&lt;/ns&gt;
      &lt;id&gt;65741&lt;/id&gt;
      &lt;revision&gt;
    &lt;id&gt;349931990&lt;/id&gt;
    &lt;parentid&gt;225434394&lt;/parentid&gt;
    &lt;timestamp&gt;2010-03-15T02:55:02Z&lt;/timestamp&gt;
    &lt;contributor&gt;
      &lt;ip&gt;143.105.193.119&lt;/ip&gt;
    &lt;/contributor&gt;
    &lt;comment&gt;/* Sources */&lt;/comment&gt;
    &lt;sha1&gt;2zkdnl9nsd1fbopv0fpwu2j5gdf0haw&lt;/sha1&gt;
    &lt;text xml:space="preserve" bytes="1436"&gt;'''Aratrum''' is the Latin word for  [[plough]], and &amp;quot;arotron&amp;quot; (αροτρον) is the [[Greek language|Greek]] word. The   [[Ancient Greece|Greeks]] appear to have had diverse kinds of plough from the earliest  historical records. [[Hesiod]] advised the farmer to have always two ploughs, so that if  one broke the other might be ready for use. These ploughs should be of two kinds, the one  called &amp;quot;autoguos&amp;quot; (αυτογυος, &amp;quot;self-limbed&amp;quot;), in which the plough-tail  was of the same piece of timber as the share-beam and the pole; and the other called  &amp;quot;pekton&amp;quot; (πηκτον, &amp;quot;fixed&amp;quot;), because in it, three parts, which were of  three kinds of timber, were adjusted to one another, and fastened together by nails.
  
  The ''autoguos'' plough was made from a [[sapling]] with two branches growing from its   trunk in opposite directions. In ploughing, the trunk served as the pole, one of the two     branches stood upwards and became the tail, and the other penetrated the ground and,    sometimes shod with bronze or iron, acted as the [[ploughshare]]. 
  
  ==Sources==
  Based on an article from ''A Dictionary of Greek and Roman Antiquities,'' John Murray,     London, 1875.
  ἄρατρον
  
  ==External links==
  *[http://penelope.uchicago.edu/Thayer/E/Roman/Texts/secondary/SMIGRA*/Aratrum.html Smith's     Dictionary article], with diagrams, further details, sources.
  [[Category:Agricultural machinery]]
  [[Category:Ancient Greece]]
  [[Category:Animal equipment]]&lt;/text&gt;
  &lt;/revision&gt;
  &lt;/page&gt;
  </code></pre>
  
  <p>I've also tried iterparse and then printing the tag of the element it finds:</p>
  
  <pre><code>for e in etree.iterparse(file_name):
      print e.tag
  </code></pre>
  
  <p>but it complains about the e not having a tag attribute.</p>
  
  <p>EDIT:
  <img src="https://i.stack.imgur.com/TPHkP.png" alt="screenshot"></p>