Thank you for your answers. Now I have different problem. When I run this code:
Qt Code:
  1. style = doc.createElement("style");//doc is QDocDocument
  2. style.setAttribute("type", "something");
  3. commonPlatform.appendChild(style); //commonPlatform is QDomEllement
To copy to clipboard, switch view to plain text mode 

I get this output in my xml file: [HTML]<style type="something" />[/HTML] And I would like to have "/style" closing of tag. How can I do that?