What is this error message ?
My code
#!/usr/bin/python
from xml.dom.minidom import Document
def CreateXml(nameSpace, rootElementName):
xmlDoc = xml.dom.minidom.Document()
xmlRootElement = doc.createElementNS(nameSpace, rootElementName)
xmlDoc.appendChild(xmlRootElement)
return xmlDoc
Error is
File "/home/users/web/b2896/moo.something/cgi-bin/py/sbmain/main.py", line 27, in initialize
xmlDoc = py.sbxml.XmlDocumentHandler.CreateXml(_GUESTNAMESPACE, 'guest')
File "/home/users/web/b2896/moo.something/cgi-bin/py/sbxml/XmlDocumentHandler.py", line 6, in CreateXml
xmlDoc = xml.dom.minidom.Document()
NameError: global name 'xml
Is it because it is not able to able to find the path of my python?
Thanks in advance
You forgot to
import xml.dom.minidomto import the XML minidom module.