title: : in node causing Keyerror in xmlparsing using ElementTree
body: <p>Hi I'm using ElementTree to parse out an xml feed from Kuler. I'm only beginning in python but am stuck here.
  The parsing works fine until I attempt to retrieve any nodes containing ':'
  e.g kuler:swatchHexColor</p>
  
  <p>Below is a cut down version of the full feed but same structure:</p>
  
  <pre><code>&lt;rss xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:kuler="http://kuler.adobe.com/kuler/API/rss/" xmlns:rss="http://blogs.law.harvard.edu/tech/rss" version="2.0"&gt;
   &lt;channel&gt;
   &lt;title&gt;kuler popular themes&lt;/title&gt;
   &lt;item&gt;
   &lt;title&gt;Theme Title: Fresh Money&lt;/title&gt;
   &lt;description&gt; 
   &amp;lt;img src="http://kuler-api.adobe.com/kuler/themeImages/theme_808366.png" /&amp;gt;&amp;lt;br /&amp;gt;
  
   Artist: thesylph005&amp;lt;br /&amp;gt;
   ThemeID: 808366&amp;lt;br /&amp;gt;
   Posted: 03/02/2010&amp;lt;br /&amp;gt;
  
   Hex:
   2F400D, 8CBF26, A8CA65, E8E5B0, 419184
  &lt;/description&gt;
  &lt;kuler:themeItem&gt;
  &lt;kuler:themeID&gt;808366&lt;/kuler:themeID&gt;
  &lt;kuler:themeTitle&gt;Fresh Money&lt;/kuler:themeTitle&gt;
  &lt;kuler:themeImage&gt;http://kuler-api.adobe.com/kuler/themeImages/theme_808366.png&lt;/kuler:themeImage&gt;
  &lt;kuler:themeAuthor&gt;
   &lt;kuler:authorID&gt;370750&lt;/kuler:authorID&gt;
   &lt;kuler:authorLabel&gt;thesylph005&lt;/kuler:authorLabel&gt;
  &lt;/kuler:themeAuthor&gt;
  &lt;kuler:themeTags/&gt;
  &lt;kuler:themeRating&gt;4&lt;/kuler:themeRating&gt;
  &lt;kuler:themeDownloadCount&gt;708&lt;/kuler:themeDownloadCount&gt;
  &lt;kuler:themeCreatedAt&gt;20100302&lt;/kuler:themeCreatedAt&gt;
  &lt;kuler:themeEditedAt&gt;20100302&lt;/kuler:themeEditedAt&gt;
  &lt;kuler:themeSwatches&gt;
   &lt;kuler:swatch&gt;
    &lt;kuler:swatchHexColor&gt;2F400D&lt;/kuler:swatchHexColor&gt;
    &lt;kuler:swatchColorMode&gt;rgb&lt;/kuler:swatchColorMode&gt;
    &lt;kuler:swatchChannel1&gt;0.183333&lt;/kuler:swatchChannel1&gt;
    &lt;kuler:swatchChannel2&gt;0.25&lt;/kuler:swatchChannel2&gt;
    &lt;kuler:swatchChannel3&gt;0.05&lt;/kuler:swatchChannel3&gt;
    &lt;kuler:swatchChannel4&gt;0.0&lt;/kuler:swatchChannel4&gt;
    &lt;kuler:swatchIndex&gt;0&lt;/kuler:swatchIndex&gt;
   &lt;/kuler:swatch&gt;
   &lt;kuler:swatch&gt;
    &lt;kuler:swatchHexColor&gt;8CBF26&lt;/kuler:swatchHexColor&gt;
    &lt;kuler:swatchColorMode&gt;rgb&lt;/kuler:swatchColorMode&gt;
    &lt;kuler:swatchChannel1&gt;0.55&lt;/kuler:swatchChannel1&gt;
    &lt;kuler:swatchChannel2&gt;0.75&lt;/kuler:swatchChannel2&gt;
    &lt;kuler:swatchChannel3&gt;0.15&lt;/kuler:swatchChannel3&gt;
    &lt;kuler:swatchChannel4&gt;0.0&lt;/kuler:swatchChannel4&gt;
    &lt;kuler:swatchIndex&gt;1&lt;/kuler:swatchIndex&gt;
   &lt;/kuler:swatch&gt;
   &lt;kuler:swatch&gt;
    &lt;kuler:swatchHexColor&gt;A8CA65&lt;/kuler:swatchHexColor&gt;
    &lt;kuler:swatchColorMode&gt;rgb&lt;/kuler:swatchColorMode&gt;
    &lt;kuler:swatchChannel1&gt;0.659722&lt;/kuler:swatchChannel1&gt;
    &lt;kuler:swatchChannel2&gt;0.791667&lt;/kuler:swatchChannel2&gt;
    &lt;kuler:swatchChannel3&gt;0.395833&lt;/kuler:swatchChannel3&gt;
    &lt;kuler:swatchChannel4&gt;0.0&lt;/kuler:swatchChannel4&gt;
    &lt;kuler:swatchIndex&gt;2&lt;/kuler:swatchIndex&gt;
   &lt;/kuler:swatch&gt;
   &lt;kuler:swatch&gt;
    &lt;kuler:swatchHexColor&gt;E8E5B0&lt;/kuler:swatchHexColor&gt;
    &lt;kuler:swatchColorMode&gt;rgb&lt;/kuler:swatchColorMode&gt;
    &lt;kuler:swatchChannel1&gt;0.91&lt;/kuler:swatchChannel1&gt;
    &lt;kuler:swatchChannel2&gt;0.898047&lt;/kuler:swatchChannel2&gt;
    &lt;kuler:swatchChannel3&gt;0.688705&lt;/kuler:swatchChannel3&gt;
    &lt;kuler:swatchChannel4&gt;0.0&lt;/kuler:swatchChannel4&gt;
    &lt;kuler:swatchIndex&gt;3&lt;/kuler:swatchIndex&gt;
   &lt;/kuler:swatch&gt;
   &lt;kuler:swatch&gt;
    &lt;kuler:swatchHexColor&gt;419184&lt;/kuler:swatchHexColor&gt;
    &lt;kuler:swatchColorMode&gt;rgb&lt;/kuler:swatchColorMode&gt;
    &lt;kuler:swatchChannel1&gt;0.254901&lt;/kuler:swatchChannel1&gt;
    &lt;kuler:swatchChannel2&gt;0.57&lt;/kuler:swatchChannel2&gt;
    &lt;kuler:swatchChannel3&gt;0.519034&lt;/kuler:swatchChannel3&gt;
    &lt;kuler:swatchChannel4&gt;0.0&lt;/kuler:swatchChannel4&gt;
    &lt;kuler:swatchIndex&gt;4&lt;/kuler:swatchIndex&gt;
   &lt;/kuler:swatch&gt;
  &lt;/kuler:themeSwatches&gt;
  </code></pre>
  
  <p>
     Tue, 30 Mar 2010 11:27:12 PST
    
      
      </p>
  
  <p>So if I do a findall on say each item's description, I get that back fine.
  But the minute I try to retrieve anything with a : in the nodename I get 
  Exception Type:   KeyError
  Exception Value:  ':'</p>
  
  <p>So this works</p>
  
  <pre><code>from elementtree.ElementTree import Element, SubElement, dump, parse
  def xml():
      kulerurl = 'http://kuler-api.adobe.com/rss/get.cfm?listType=popular&amp;startIndex=0&amp;itemsPerPage=5&amp;timeSpan=30&amp;key=mykey'
      rss = parse(urllib.urlopen(kulerurl)).getroot()
      for element in rss.findall('channel/item'):
          print(element.findtext('description'))
      dump (rss)
  </code></pre>
  
  <p>but this doesn't</p>
  
  <pre><code>def xml():
      kulerurl = 'http://kuler-api.adobe.com/rss/get.cfm?listType=popular&amp;startIndex=0&amp;itemsPerPage=5&amp;timeSpan=30&amp;key=mykey'
      rss = parse(urllib.urlopen(kulerurl)).getroot()
      for element in rss.findall('channel/item/kuler:themeItem'):
          print(element.findtext('kuler:themeID'))
      dump (rss)
  </code></pre>
  
  <p>I'm sure it's something simple if anyone could point me to what I'm doing wrong here I'd be most grateful</p>
  
  <p>thanks
  Kieran</p>