Consider the following HTML text:
hello<strong> </strong>world
When using htmlcleaner-gui-2.29 on a file with this content, the output will be:
<?xml version="1.0" encoding="utf-8"?>
<html>
<head />
<body>helloworld</body>
</html>
That is, the whitespace enclosed in the strong tag is dropped. In my Java application, the space is dropped from the tree likewise.
(It is worth noting that in some constellations, the rule of which I could not quite determine, the htmlcleaner-gui-2.29 output will contain a newline instead of the space because it chooses a different formatting rule. Unfortunately I could not determine a good way of resolving the issue yet.)