@Bart_Vandewoestyne said:

QDomElement

HI
Since it stores it text as QStrings its pretty self contained so even
doc is deleted the text should still be valid.

One should imagine
element = doc.documentElement() should point to invalid
node after, but Im wondering if a copy is made.

One test could be fun though
http://doc.qt.io/qt-5/qdomnode.html#ownerDocument
Should return a null node. (isNull returns true)