Hey!
Sorry about being so vague. I hope this makes more sense. So I have used XML::Twig to parse the whole file and it took 70 secs for one file. And I have to parse many such files at one go. So instead I thought I could just display the options to parse and parse only that particular section. But like you said, it may be a good idea to display leaf for each menu and then do step 3 and 4.