Personal tools
You are here: Home Developer Resources Knowledgebase How to add <?xml version = '1.0'?> to the beginning of a QDomDocument?
Document Actions

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"));
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: