How to? Created a document and an element:
import xml.dom.minidom as d
a=d.Document()
b=a.createElement('test')
setIdAttribute doesn't work :(
b.setIdAttribute('something')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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
And if I set this by hand, getElementById can't find it.
b.setAttribute('id', 'something')
a.getElementById('something')
What I have to do?