[XML-SIG] minidom and validating parser error messages

Jan Delgado Jan.Delgado@unamite.com
Tue, 16 Oct 2001 15:12:31 +0200


hi,
i want to read and validate an xml file into a dom object.
i was trying the following (among approx. 1000 other things ;-):
(i am using PyXML 0.6.6-2)

----------------------------------------------------------
from xml.dom.minidom import parse
import xml.sax.saxexts
import xml.sax.saxlib
import sys

# ask any validating parser from the XML validating parser factory
parser = xml.sax.saxexts.XMLValParserFactory.make_parser()
print "Using parser:", parser
dom = parse(sys.stdin, parser)
----------------------------------------------------------

when i run the program, i always get an error:

...
 File "/usr/lib/python2.0/site-packages/_xmlplus/dom/pulldom.py", line 219,
in
reset
    self.parser.setFeature(xml.sax.handler.feature_namespaces, 1)
AttributeError: 'SAX_XPValParser' instance has no attribute 'setFeature'


unfortunately, the documentation is *more than poor* (sorry guys).

so what is wrong here ?

what is this "sax2exts" module used for ? when i tried that module for
the parser generation, i noticed that there was a different error message
(about a missing feed() method)

greetings
	jan