That's principal right, but I guess you want to read the value somewhere else in your program. So every time open, save, read in elsewhere is not very good. Therefore only create one instance and pass a pointer of the QDomDocument to the needed classes, or use a singleton approach.
Bookmarks