When QDomDocument reads XML elements that consist only of whitespace, it reads an empty element. This answer provides a solution to the problem, using QXm
QDomDocument
QXm