Alexandre CONRAD wrote: > 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).
speed and no 3rd party tools aren't exactly compatible requirements. however, if it's okay for you to ship one or two python modules with your application, you could use the ElementTree and ElementPath modules from the ElementTree kit, together with Python's pyexpat. http://effbot.org/zone/elementtree.htm by itself, ElementTree is a bit faster than most other DOM implementations. if you add the cElementTree module (a standard component on many modern Linux systems), you'll end up with something that can read XML files faster than Python can read text files: http://effbot.org/zone/celementtree.htm#benchmarks ET is a bit limited in the XPath department, though. if you want reasonable speed and full XPath support (and a *lot* more), see http://codespeak.net/lxml/ </F> _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig