Assistant trouble shooting 'ImportError: No module named dom.ext.reader'

"Hardison Leif" <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <21558CA25042D2438FB3CFE70B31A6EB03410ACA@US-WKF-MAIL1.comverse.com>
Hello,

I'm currently working on learning Python's tools for working with XML.
So far I have installed Python 2.4.1 and PyXML 0.8.4 on a Debian 3.1
Linux host.

The error I'm receiving when running an example file is:

my-host:/home/.../scripts# /usr/local/bin/python xml2.py
Traceback (most recent call last):
  File "xml2.py", line 2, in ?
    from xml.dom.ext.reader import Sax2
  File "/home/.../scripts/xml.py", line 1, in ?
    from xml.dom.ext.reader import Sax2
ImportError: No module named dom.ext.reader

The xml2.py file looks like this:

import sys
from xml.dom.ext.reader import Sax2
from xml.dom.ext import PrettyPrint

reader = Sax2.Reader()

# get DOM object
doc = reader.fromStream("extract.xml")

PrettyPrint(doc)

Python and PyXML both installed with out producing any noticeable
errors.  I'm stumped as even the demo files listed in the PyXML
distribution say that they are out of date.

Any pointers and troubleshooting advice appreciated.

Thanks,

Leif Hardison
> Data Center Engineer
Comverse
[email protected]

_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.