[Qt-interest] Saving XML DOM to file
Lane Christiansen
lanec42 at gmail.com
Sun Nov 15 10:54:35 CET 2009
I'm having trouble saving my QDomDocument to a file. This:
QTextStream out(stdout);
out << doc.toString();
(where doc is a QDomDocument) gives me the correct output. This:
QFile file("config.xml");
QTextStream out(&file);
doc.save(out, INDENT, QDomNode::EncodingFromTextStream);
out.flush();
file.close();
unfortunately, gives me nothing - the file never gets created. What am I doing
wrong?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091115/676d4d43/attachment.bin
More information about the Qt-interest-old
mailing list