Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5963073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:11:45+00:00 2026-05-22T19:11:45+00:00

What is this error message ? My code #!/usr/bin/python from xml.dom.minidom import Document def

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:11:46+00:00Added an answer on May 22, 2026 at 7:11 pm

    You forgot to import xml.dom.minidom to import the XML minidom module.

    >>> xml.dom.minidom.Document()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'xml' is not defined
    >>> import xml.dom.minidom
    >>> xml.dom.minidom.Document()
    <xml.dom.minidom.Document instance at 0x7f73ae601a28>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the code below: #!/usr/bin/env python from PyQt4 import QtCore, QtGui import os,sys class
Here is the working code in Python (using cURL): #!/usr/bin/python import pycurl c =
I just got this error message: ... from c:/ruby/lib/ruby/gems/1.8/gems/... ... 10 levels... from c:/ruby/lib/ruby/gems/1.8/gems/...
This error message appears on a colleague's machine when he tries to launch a
Has anyone run into this error message before when using a timer on an
I get this error message when installing SQL 2005 Analysis services. The cabinet File
I'm getting this error message on all projects (including brand new empty templates) I'm
I just ran across this error message while working in C# A property or
Inside VS2005, our whole programming staff gets this error message sporadically and it is
I get this message when compiling C++ on gcc 4.3 error: ‘NULL’ was not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.