def findElements(parent, matcher):
 return findNodes(parent, (lambda n, matcher=matcher: ((getattr(n, 'tagName', None) is not None) and matcher(n))))

def findElements ( parent , matcher ) : return findNodes ( parent , ( lambda n , matcher = matcher : ( ( getattr ( n , 'tagName' , None ) is not None ) and matcher ( n ) ) ) )
return an iterable of the elements which are children of c{parent} for which the predicate c{matcher} returns true .