XML attributes have wrong name

Jeff Epler jepler at unpythonic.net
Mon Mar 22 18:29:28 EST 2004


It would help if you supplied a complete program or interactive shell
session.

I tried to guess what you were doing but I didn't reproduce the problem:

$ python
Python 2.2.3 (#1, Oct 15 2003, 23:33:35) 
[GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.dom.minidom as dom
>>> d = dom.Document()
>>> e = d.createElement("node")
>>> e.setAttribute("type", "foo")
>>> e.toxml()
'<node type="foo"/>'

The above comes from an interactive session on Fedora Core 1.

Jeff




More information about the Python-list mailing list