<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def node_from_xml(xmlfile, nodefactory=Node):
 """ Convert a .xml file into a Node object. :param xmlfile: a file name or file object open for reading """

    root = parse(xmlfile).getroot()
    return node_from_elem(root, nodefactory)