
要想在QDomDocument的开头插入“<?xml version="1.0" ?>”,则使用“createProcessingInstruction( "xml" , "version=\"1.0\" encoding=\"utf-8\"" );”得到一个 QDomProcessingInstruction对象,再将这个对象用appendChild插入到文档中。
http://www.qtcentre.org/threads/16061-QDomDocument-and-xml-version-encoding-definitions
亮点:
QDomDocument::createProcessingInstruction()
e.g.
Qt Code:
Switch view
createProcessingInstruction( "xml", "version= \" 1.0 \" encoding= \" utf-8 \" " );
HxLauncher: Launch Android applications by voice commands