[XML-SIG] Provide your own SAX parser to the DOM?

Dieter Maurer dieter at handshake.de
Tue Dec 2 13:41:22 EST 2003


Chris Herborth wrote at 2003-12-1 13:51 -0500:
 > I've got PyXML 0.8.3 installed here, and I'm generating the DOM for some 
 > documents thusly:
 > 
 > reader = xml.dom.ext.reader.Sax2.Reader()
 > 
 > # snipped: setting up an external entity resolver and error handler
 > 
 > dom = reader.fromStream( file( an_xml_filename ) )
 > 
 > Is it possible to use a different SAX parser and still get the advantages of 
 > using the PyXML DOM goodness?

The "Reader" class has an optional "parser" argument.
Look at its source...

-- 
Dieter



More information about the XML-SIG mailing list