PDA

View Full Version : QDomProcessingInstruction



Weilor
4th July 2007, 10:50
Hi all,

I've read through all the xml stuff in the documentation, but I still can't figure out how to add <?xml version='1.0' encoding='UTF-8'?> to my QDomDocument. Has anyone already done this?

Greets,
Weilor

jpn
4th July 2007, 14:53
I'm not exactly sure if there's a better way but maybe this is sufficient for you:


QDomDocument doc;
QDomProcessingInstruction pi = doc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
doc.appendChild(pi);
...

Weilor
4th July 2007, 15:06
Perfect! Thanks a lot.