title: BeautifulSoup finding xml tags
body: <p>I've got some OSM data of fast food restaurants which I retrieved using the <a href="http://open.mapquestapi.com/xapi/" rel="nofollow">Xapi</a>, and <a href="http://open.mapquestapi.com/xapi/api/0.6/node%5Bamenity=fast_food%5D%5Bbbox=-77.03299606884731,38.88960821016589,-77.01582993115268,38.8971235910255%5D" rel="nofollow">here</a> are  some sample results:</p>
  
  <pre><code>&lt;osm version="0.6" generator="Osmosis SNAPSHOT-r26564"&gt;
     &lt;node id="486275964" version="4" timestamp="2010-05-03T08:21:42Z" uid="12055" user="aude" changeset="4592597" lat="38.8959533" lon="-77.0212458"&gt;
        &lt;tag k="name" v="Potato Valley Cafe"/&gt;
        &lt;tag k="amenity" v="fast_food"/&gt;
     &lt;/node&gt;
     &lt;node id="486275966" version="4" timestamp="2010-08-06T16:44:13Z" uid="207745" user="NE2" changeset="5418228" lat="38.8959399" lon="-77.0196338"&gt;
        &lt;tag k="cuisine" v="burger"/&gt;
        &lt;tag k="name" v="McDonald's"/&gt;
        &lt;tag k="amenity" v="fast_food"/&gt;
     &lt;/node&gt;
     &lt;node id="612190923" version="1" timestamp="2010-01-12T14:01:27Z" uid="111209" user="cov" changeset="3603297" lat="38.893683" lon="-77.0292732"&gt;
        &lt;tag k="level" v="-1"/&gt;
        &lt;tag k="cuisine" v="sandwich"/&gt;
        &lt;tag k="name" v="Quizno's"/&gt;
        &lt;tag k="amenity" v="fast_food"/&gt;
     &lt;/node&gt; 
  &lt;/osm&gt;
  &lt;!--corrected indentation--&gt;
  </code></pre>
  
  <p>I'm trying to used BeautifulSoup in python to extract the lat, long, name and cuisine from this. I can get the lat and long no problem with this code:</p>
  
  <pre><code>soup = BeautifulSoup(results)
  takeaways = soup.findAll('node')
  
  for eachtakeaway in takeaways:
      longitude = str(eachtakeaway['lon'])
      lattitude = str(eachtakeaway['lat'])
  </code></pre>
  
  <p>But I can't get the name:</p>
  
  <pre><code>name = str(eachtakeaway['name'])
  </code></pre>
  
  <p>Which throws up the error:</p>
  
  <pre><code>TypeError: 'NoneType' object is not callable
  </code></pre>
  
  <p>Can you tell me what to do? Thanks.</p>