The problem is, that you will be aware of this only AFTER you created a DB and worked with it. Unfortunately, users are not informed when creating a DB that they should think about whitespace. And there is no reason a user should assume that creating a DB would semantically change their data. [...]
Yes, I absolutely agree. After all, it’s always tricky to handle issues that have some historical roots.
To improve things a little, I have added support for the xml:space attributes in the latest snapshot [1]. If you add this attribute to an element, all whitespaces in the descendant text nodes will be preserved:
<a xml:space="preserve"> <b> abc </b> </a>
Note that the XML snippet above now contains three text nodes instead of one, which means that the generated database will obviously take more space. If you want to reduce memory consumption, the xml:space attributes should either be added to the relevant elements..
<a> <b xml:space="preserve"> abc </b> </a>
..or the XML indentations should be removed from the document:
<a xml:space="preserve"><b> abc </b></a>
Hope this helps, Christian