(sending again to the list) Uche Ogbuji wrote: > There are so many ways to do all this that I'm not sure where to start. > What are your priorities? Speed? Low memory footprint? Simplicity of > code? Avoiding installing 3rd-party tools?... >>>Warning: 4DOM is very slow. It's claim to fame used to be compliance, >>>but now it has been superseded in that regard by Andrew Clover's pxdom. >>> >>>I'm pretty sure I wouldn't recommend 4DOM to anyone for anything right >>>now. >> >>Well, I'm just reading the documentation. What would you recommand ? > > > I need much more info. minidom? cDomlette? pxdom? A Python "data binding"? > An output library? Many things would work.
Hello list, I'm back on an old topic of mine. I'm thinking of re-writing the XML application that I have been running fine for a while now. Plus, I'm now more confortable with XML and mostly Python in general compared to my skills back in august 2004. But today, I'm bumping into a problem I remembered that Uche Ogbuji pointed to me. "4DOM is very slow". :) So until now, everything worked fine for me with XML files containing about 50 nodes or so. But now I'm getting into XML files from 200 to 800 nodes (and more). And I do feel that 4DOM is slow. To open an XML file, I use: from xml.dom.ext.reader import Sax2 reader = Sax2.Reader() doc = reader.fromStream("playlist.xml") xml.dom.ext.StripXml(doc) return doc So I'd like some advices of what could be recommanded as a replacement of 4DOM. (building and parsing XML files) You were talking about minidom, cDomlette, xpdom, etc... I would prefer using python's standard module library rather than installing 3rd party tools. Speed (faster than 4DOM would be a good start) is one of my priorities. I'm also using XPath for parsing (not always though). Regards, -- Alexandre CONRAD - TLV Research & Development tel : +33 1 30 80 55 05 fax : +33 1 30 80 55 06 6, rue de la plaine 78860 - SAINT NOM LA BRETECHE FRANCE _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig