in reply to Parsing an xml file

Read about XPath and search it in CPAN, for example you can use XML-XPath

Maybe you would like to learn xmlstarlet which is a command line xml editing tool