def METHOD_NAME(pom):
    dom = xml.dom.minidom.parse(pom)
    project = dom.childNodes[0]
    version = child_node(project, 'version')
    if version:
        return node_text(version)
    parent = child_node(project, 'parent')
    version = child_node(parent, 'version')
    return node_text(version)