[XML-SIG] [DOM PyXML-0.7-1] fix to demo/dom/generate_xml1.py
Eric Boix
frog@creatis.insa-lyon.fr
Fri, 8 Feb 2002 09:47:12 +0100
Hi,
Apparentrly the demo/dom/generate_xml1.py is broken:
Traceback (most recent call last):
File "PyXML/demo/dom/generate_xml1.py", line 17, in ?
doc = implementation.createHTMLDocument('', 'mydoc', dt)
TypeError: createHTMLDocument() takes exactly 2 arguments (4 given)
I could get it running with the following changes :
----------------------------------------
doc = implementation.createHTMLDocument('', 'mydoc', dt)
---
> doc = implementation.createDocument(None, 'mydoc', dt)
23c18
< new_elem = doc.createElementNS('', 'spam')
---
> new_elem = doc.createElementNS(None, 'spam')
26c21
< new_elem.setAttributeNS('', 'eggs', 'sunnysideup')
---
> new_elem.setAttributeNS(None, 'eggs', 'sunnysideup')
38,39c33,34
< import xml.doc.ext
< xml.doc.ext.Print(doc)
---
> from xml.dom import ext
> ext.Print(doc)
----------------------------------------
Am I correct or am I missing something ?
Yours,
Eric Boix
Creatis : Medical imaging lab
http://www.creatis.insa-lyon.fr/~frog