in reply to storing xml file in hash

Use a parser, such as XML::Twig. If you want a more detailed answer, provide a small sample of your XML, your expected output, and the code you have tried.