in reply to XML for a newbie

You probably don't want to use XML::Simple, whose usage is discouraged. Try XML::LibXML instead.

Update: Oops, Athanasius has just provided a much more complete answer jus above while I was typing and posting under a very slow mobile network connection.