'Get a child 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})
@param default: Returned when child not-found.
@type default: L{Element}
@return: The requested child, or I{default} when not-found.
@rtype: L{Element}'

def getChild(self, name, ns=None, default=None):

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