Thanks for all the help everyone. I ended up going with XML::Twig beacuse when i looked at it just clicked in my brain. As a side note the lack of the closing location tag was a typo that I'didnt notice until everyone came up with how to fix that as well as do what I wanted. Thanks for all the help.