def iterTags(self, name, attrs={}, namespace=None):
        """ Iterate over all children using specified arguments as filter. """
        for node in self.kids:
            if not node: continue
            if namespace is not None and namespace!=node.getNamespace(): continue
            if node.getName() == name:
                for key in attrs.keys():
                    if key not in node.attrs or \
                        node.attrs[key]!=attrs[key]: break
                else:
                    yield node
 Iterate over all children using specified arguments as filter. 
chrome-cordova/gcmServer/xmpp/simplexml.py