Adding text nodes (even if they are just whitespace) as children of root causes a DOM006 exception in the document builder. Hence, these text nodes are now ignored.