Hey guys, I have the following code:

Qt Code:
  1. void xmlBaseTest::myBlankFile()
  2. {
  3. QFile data("booklist.xml");
  4. QDomElement root = doc->createElement("booklist");
  5. doc->appendChild(root);
  6.  
  7. if (data.open(QFile::WriteOnly | QFile::Truncate)) {
  8. QTextStream out(&data);
  9. doc->save(out,4);
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 

It creates the file:
Qt Code:
  1. <!DOCTYPE serverlist>
  2. <booklist/>
To copy to clipboard, switch view to plain text mode 

The line <booklist/> is causing problems, when trying to read it later using .setContent. I was wondering if there was any way to get it to print out <booklist></booklist> instead?

Thanks much