def grandchildren_with_tag(child,tagnames):
    """Return children of child that have tag names in 
    the given set of tag names"""
    ret=[]
    for grandchild in child.iterchildren():
        if grandchild.tag in tagnames:
            ret.append(grandchild)
            pass
        pass
    return ret