title: TypeError : 'NoneType' object not callable Python with BeautifulSoup XML
body: <p>I have the following XML file : </p>
  
  <pre><code>&lt;user-login-permission&gt;true&lt;/user-login-permission&gt;
          &lt;total-matched-record-number&gt;15000&lt;/total-matched-record-number&gt;
          &lt;total-returned-record-number&gt;15000&lt;/total-returned-record-number&gt;
          &lt;active-user-records&gt;
              &lt;active-user-record&gt;
                  &lt;active-user-name&gt;username&lt;/active-user-name&gt;
                  &lt;authentication-realm&gt;realm&lt;/authentication-realm&gt;
                  &lt;user-roles&gt;Role&lt;/user-roles&gt;
                  &lt;user-sign-in-time&gt;date&lt;/user-sign-in-time&gt;
                  &lt;events&gt;0&lt;/events&gt;
                  &lt;agent-type&gt;text&lt;/agent-type&gt;
                  &lt;login-node&gt;node&lt;/login-node&gt;
               &lt;/active-user-record&gt; 
  </code></pre>
  
  <p>There are many records
  I'm trying to get values from tags and save them in a different text file using the following code : </p>
  
  <pre><code>soup = BeautifulSoup(open("path/to/xmlfile"), features="xml") 
  
  
  with open('path/to/outputfile', 'a') as f:
      for i in range(len(soup.findall('active-user-name'))):
          f.write ('%s\t%s\t%s\t%s\n' % (soup.findall('active-user-name')[i].text, soup.findall('authentication-realm')[i].text, soup.findall('user-roles')[i].text, soup.findall('login-node')[i].text))
  </code></pre>
  
  <p>I get the error TypeError : 'NoneType' object not callable Python with BeautifulSoup XML for line :  for i in range(len(soup.findall('active-user-name'))):</p>
  
  <p>Any idea what could be causing this?</p>
  
  <p>Thanks!</p>