def getDirectChildrenWithName(parent, name):
    """ Fetch *direct* sub-nodes of a `parent` DOM tree. These
        nodes must have a name matching `name`.

        Return a list of DOM Nodes.
    """
    return [ node for node in parent.childNodes
             if node.nodeType == node.ELEMENT_NODE and \
             node.localName == name ]