I really must learn to clarify my posts. I'm not trying to parse the XML, just clean it before it is picked up on our FTP server by another department. I'm the middle man here - neither the generator of said XML nor the intended recipient. Thanks anyway for your suggestion.
UPDATE - Thanks
theguvnor, you're right of course - I am obviously parsing here. I also agree that regex parsing is a complete no-no for any form of long-term XML parsing solution (I use XML::Parser
very frequently actually). The program I whipped up was a quick hack of a "fix" program that would be used on XML that I could
guarantee would not change format, hence regex parsing is not as scary (perhaps). The thought being that "proper" XML parsing with a reputable parser (i.e XML::Parser) and then re-writing the XML out was overkill. Then again, perhaps it was a mistake to even post my code (*grin*) (it does work afterall) as I should have known I'd be taken out back and beaten with a stick for even mentioning XML and regex in the same breath (*grin*).
Thanks again mate, I do appreciate your answers as it was obviously a dodgy post judging from the lack of overall response ;)