title: Using Python's xml.dom.minidom
body: <p>I'm trying to use Python's xml.dom.minidom, and I'm getting the following error:</p>
  
  <pre><code>&gt;&gt;&gt; from xml.dom import minidom
  &gt;&gt;&gt; xdocument = minidom.Document()
  &gt;&gt;&gt; xrss = minidom.Element("rss")
  &gt;&gt;&gt; xdocument.appendChild(xrss)
  &lt;DOM Element: rss at 0xc1d0f8&gt;
  &gt;&gt;&gt; xchannel = minidom.Element("channel")
  &gt;&gt;&gt; xrss.appendChild(xchannel)
  Traceback (most recent call last):
    File "C:\Program Files\Wing IDE 3.2\src\debug\tserver\_sandbox.py", line 1, in ?
      # Used internally for debug sandbox under external interpreter
    File "c:\Python24\Lib\xml\dom\minidom.py", line 123, in appendChild
      _clear_id_cache(self)
    File "c:\Python24\Lib\xml\dom\minidom.py", line 1468, in _clear_id_cache
      node.ownerDocument._id_cache.clear()
  AttributeError: 'NoneType' object has no attribute '_id_cache'
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Anyone has any idea why?</p>