'Get a list of children by (optional) name and/or (optional) namespace.
@param name: The name of a child element (may contain prefix).
@type name: basestring
@param ns: An optional namespace used to match the child.
@type ns: (I{prefix}, I{name})
@return: The list of matching children.
@rtype: [L{Element},...]'

def getChildren(self, name=None, ns=None):

    if (ns is None):
        if (name is None):
            return self.children
        (prefix, name) = splitPrefix(name)
        if (prefix is None):
            ns = None
        else:
            ns = self.resolvePrefix(prefix)
    return [c for c in self.children if c.match(name, ns)]
