Skip to content

Instantly share code, notes, and snippets.

@arturo182
Created January 29, 2012 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturo182/1700567 to your computer and use it in GitHub Desktop.
Save arturo182/1700567 to your computer and use it in GitHub Desktop.
QDomDocument doc;
QDomProcessingInstruction process = doc.createProcessingInstruction("xml", "version=\"1.0\"");
doc.appendChild(process);
QDomElement stream = doc.createElementNS("http://etherx.jabber.org/streams", "stream");
stream.setPrefix("stream");
stream.setAttribute("xmlns", "jabber:client");
stream.setAttribute("to", "amessage.de");
doc.appendChild(stream);
qDebug() << doc.toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment