yoreek / XML-Hash-XS

Convert hash to xml
Other
4 stars 4 forks source link

Elements containing only spaces get automatically trimmed #16

Closed marghidanu closed 6 years ago

marghidanu commented 6 years ago

I believe the title is pretty descriptive but it's better to put a little context on it. Right now in our application spaces have meaning and we're actually relying on these values. The trim option set to 0 works fine as long as the value does not consist only of spaces. Therefor in this situation:

<root><tag>    </tag></root>

the value for tag will be set to empty string. The problem is we cannot differentiate between this and the following XML:

<root><tag/></root>

Thank you!

yoreek commented 6 years ago

Thanks for report. I fixed bug on version 0.53. Can you check please ?

marghidanu commented 6 years ago

Yep! Works just fine, just tested it and staged it in the local Perl repository. Thanks for the bugfix!