[XML-SIG] no 'writexml' when building a domTree from ext.Sax2
aconrad.tlv at magic.fr
Tue May 2 21:30:24 CEST 2006
(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
>>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.
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,
from xml.dom.ext.reader import Sax2
reader = Sax2.Reader()
doc = reader.fromStream("playlist.xml")
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
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
More information about the XML-SIG