in reply to problem parsing XML into hash

You say that the file isn't XML, but it looks like well-formed XML to me. In which case the easiest way to get it into a hash would be to use XML::Simple.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg