No default xml parsers?
Magnus Lie Hetland
mlh at idi.ntnu.no
Thu Aug 9 19:02:22 EDT 2001
Must support for xml (xml.dom and xml.sax) be compiled
in, or is there some default parser somewhere?
I'm using 2.2a, but can't get things to work...
Python 2.2a1 (#4, Aug 8 2001, 20:43:39)
[GCC 2.8.1] on sunos5
Type "copyright", "credits" or "license" for more information.
>>> from xml import sax
>>> parser = sax.make_parser()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/idi/f/mlh/python/current/Lib/xml/sax/__init__.py", line 88, in
make_parser
raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found
Are there no pure-Python parsers (except in xmllib)? I care
more about "out-of-the-box'ness" than performance here...
(I see that my Windows Python creates an Expat parser, but
I guess that's not compiled in by default...)
Of course, xmllib is probably fine, but since it's deprecated
I'm reluctant to use it.
(Even xml.dom.minidom doesn't work; how about a dumbdom or
dumbsax or something, like dumbdbm?)
--
Magnus Lie Hetland http://www.hetland.org
"Reality is that which, when you stop believing in
it, doesn't go away." -- Philip K. Dick
More information about the Python-list
mailing list