写xml
<root>
<element>
<sub id=-1></sub>
</element>
</root>
//添加xml说明
QDomDocument doc;
QDomProcessingInstruction instru;
instru = doc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");
doc.appendChild(instru);
//添加根节点
QDomElement root = doc.createElement("root");
doc.appendChild(root)