title: How to set element's id in Python's xml.dom.minidom?
body: <p>How to? Created a document and an element:</p>
  
  <pre><code>import xml.dom.minidom as d
  a=d.Document()
  b=a.createElement('test')
  </code></pre>
  
  <p>setIdAttribute doesn't work :(</p>
  
  <pre><code>b.setIdAttribute('something')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/python2.6/xml/dom/minidom.py", line 835, in setIdAttribute
      self.setIdAttributeNode(idAttr)
    File "/usr/lib/python2.6/xml/dom/minidom.py", line 843, in setIdAttributeNode
      raise xml.dom.NotFoundErr()
  xml.dom.NotFoundErr
  </code></pre>
  
  <p>And if I set this by hand, getElementById can't find it.</p>
  
  <pre><code>b.setAttribute('id', 'something')
  a.getElementById('something')
  </code></pre>
  
  <p>What I have to do?</p>