title: xml.dom.minidom: Getting CDATA values
body: <p>I'm able to get the value in the image tag (see XML below), but not the Category tag. The difference is one is a CDATA section and the other is just a string.  Any help would be appreciated.</p>
  
  <pre><code>from xml.dom import minidom
  
  xml = """&lt;?xml version="1.0" ?&gt;
  &lt;ProductData&gt;
      &lt;ITEM Id="0471195"&gt;
          &lt;Category&gt;
              &lt;![CDATA[Homogenizers]]&gt;        
          &lt;/Category&gt;
          &lt;Image&gt;
              0471195.jpg
          &lt;/Image&gt;
      &lt;/ITEM&gt;
      &lt;ITEM Id="0471195"&gt;
          &lt;Category&gt;
              &lt;![CDATA[Homogenizers]]&gt;        
          &lt;/Category&gt;
          &lt;Image&gt;
              0471196.jpg
          &lt;/Image&gt;
      &lt;/ITEM&gt;
  &lt;/ProductData&gt;
  """
  
  bad_xml_item_count = 0
  data = {}
  xml_data = minidom.parseString(xml).getElementsByTagName('ProductData')
  parts = xml_data[0].getElementsByTagName('ITEM')
  for p in parts:
      try:
          part_id = p.attributes['Id'].value.strip()
      except(KeyError):
          bad_xml_item_count += 1
          continue
      if not part_id:
          bad_xml_item_count += 1
          continue
      part_image = p.getElementsByTagName('Image')[0].firstChild.nodeValue.strip()
      part_category = p.getElementsByTagName('Category')[0].firstChild.data.strip()
      print '\t'.join([part_id, part_category, part_image])
  </code></pre>