Added to parseFile() so that it extracts information on which ids to use next from the DOM document object.