import sysfrom xml.dom import minidomfrom xml import xpathdoc = minidom.parse(open(sys.argv[1]))result = xpath.Evaluate('/recipe/ingredients/item',doc)print result