would it hurt anything to preserve the whitespace in case of tags with no children?
This is going to sound rude and uncaring (which is unfortunate because I try not to be either) but ... Yes, it would hurt.
You're talking about changing the default behaviour. In a module that's been around as long as this one has then that is certain to break a lot of scripts. Just by way of example, it broke 21 tests in the test suite that ships with the module. It also introduced almost 2000 warning messages during make test.
Now obviously it would be possible to clean up the warnings and add another option so the default behaviour was not affected, but that's not really going to fly either. XML::Simple already has far too many options. The claim to the name 'Simple' was lost years ago. I regularly reject requests to add 'one simple option' because I don't want to make matters worse.
The reality is that XML::LibXML is a powerful and flexible module that can do what you want. You might want to put your own thin wrapper around it to simplify the things that you want to do regularly. In the end though, it will be a better solution because it will work the way you expect it to work and it won't bogged down with options to make it work in the weird and wonderful ways other people expect.
Sorry if I sound grumpy.
In reply to Re^3: XML::Simple bug? aka I want the whitespace dude!
by grantm
in thread XML::Simple bug? aka I want the whitespace dude!
by Jenda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |