in reply to XML to XML
This is a very good job for XSLT which is used to transform XML to XML (or anything else for that matter). Have a look at XML::LibXSLT.
Hope this helps, -gjb-