def getNamedNode(node, nodename):
    """
    Return first named subnode of the supplied node
    """
    subnodes = node.getElementsByTagName(nodename)
    if len(subnodes) > 0:
        return subnodes[0]
    return None