in reply to Re: How to remove spaces after modifying an xml sheet.
in thread How to remove blank lines(new lines) after modifying an xml sheet.

I have never used the XML::Twig I think (without been able to verify)

Sorry but it seems purge has no influence on the problem.

Also, in regards to XML::Simple see e.g. here and the thread it links to.