How to add <?xml version = '1.0'?> to the beginning of a QDomDocument?
Answer:
<?xml version = '1.0'?> is added by creating a processing instruction as the first child of the document:
QDomDocument doc;
doc.appendChild(doc.createProcessingInstruction("xml version =", "'1.0'"));
doc.appendChild(doc.createElement("hi"));