def getTags(self, name, attrs={}, namespace=None, one=0):
        """ Filters all child nodes using specified arguments as filter.
            Returns the list of nodes found. """
        nodes=[]
        for node in self.kids:
            if not node: continue
            if namespace 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: nodes.append(node)
            if one and nodes: return nodes[0]
        if not one: return nodes
 Filters all child nodes using specified arguments as filter.
            Returns the list of nodes found. 
chrome-cordova/gcmServer/xmpp/simplexml.py