[XML-SIG] Speeding up DOM reading

horst@freedict.de horst@freedict.de
Mon, 17 Dec 2001 08:15:56 +0100 (CET)


Hello,

I finally figured out how to get / set attributes - use name spaces. But
things work fine, and I was able to turn on validation, which turns out
to be fairly slow (The DTD is large (TEI)).

Reading the documentation, it appreas that there are differnt modules
around for reading in (and validate) XML, but I never found a hint on
how to do it. What should I do instead of:



    from xml.dom import Node, Comment  # Node must be imported first
    from xml.dom import ext
    from xml.dom.ext.reader import Sax2
    from xml import xpath
    from xml.xpath import Util
    from Ft.Lib.pDomlette import PyExpatReader
    from StringIO import StringIO

    DOM1 = Sax2.FromXmlStream(xmlfile, validate = 1, catName= "/var/lib/sgml/freedict/public.soc")


thanks,

Horst

-- 
Horst@freedict.de
Horst Eyermann 
Germany

You need a dictionary? - visit http://www.freedict.de
for free (GPL) dictionaries (unix; windows work in progress)
For windows, visit http://www.freedict.de/wbuch

A article (in German) about dictionary efforts on the net
http://www.heise.de/tp/deutsch/inhalt/on/5927/1.html