[XML-SIG] py2exe and switching from PyXML 4Suite
Sun, 15 Dec 2002 14:25:04 -0700
> > Because you're such a nice guy, I'll ditch the tease for you :-)
> You can also do these much more easily using XPath...
> from Ft.Xml import XPath
> def getElementsByTagName(node,name)
> return XPath.evaluate(node,".//" + name)
I think my generator approach would be faster, but this XPath approach has the
advantage of working in Python 2.0 and 2.1. Mine is 2.2+.
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
A Python & XML Companion - http://www.xml.com/pub/a/2002/12/11/py-xml.html
XML class warfare - http://www.adtmag.com/article.asp?id=6965
MusicBrainz metadata - http://www-106.ibm.com/developerworks/xml/library/x-thi