Author Digitalxero
Recipients Digitalxero
Date 2009-08-06.03:35:15
SpamBayes Score 1.17944e-07
Marked as misclassified No
Message-id <>
I recently converted a project from using a custom  implementation of 
xml.dom.minidom to using EelemntTree that comes with python2.5+ and 
found myself wishing for a find(tag_or_path) method that would do so iteratively instead of just on the current elements direct children. 
This is possible with the code as written;

looking_for = None
for el in etree.getiterator(tag_or_path):
    looking_for = el

I have to do this type of action so often in my code that I just decided 
to grab the python implementation of etree that came with py2.6 and 
include it with my app and patch in an iter_find method as the instant 
break for loop is just asking for maintenance issues down the road what 
I forget why I was breaking on the first loop no matter what.
Date User Action Args
2009-08-06 03:35:20Digitalxerosetrecipients: + Digitalxero
2009-08-06 03:35:20Digitalxerosetmessageid: <>
2009-08-06 03:35:18Digitalxerolinkissue6655 messages
2009-08-06 03:35:17Digitalxerocreate