^_^
QString fileName("sample");
QFile xmlFile(fileName + ".xml");
if(xmlFile.open(IO_WriteOnly))
{
QTextStream xmlStream(&xmlFile);
xmlStream.setEncoding(QTextStream::UnicodeUTF8);
QDomDocument xmlDoc;
QString strHead("version=\"1.0\" encoding=\"UTF-8\"");
xmlDoc.appendChild(svgDoc.createProcessingInstruction("xml", strHead));
xmlStream<<xmlDoc.toString();
}
xmlFile.close();