Hello,
I have a class Dictionary with "Word" and its frequency into a document. I wrote to file all these informations as xml. I wrote the file using .write method eg: out.write("<dic>\r\n"); etc. Is this way to write XML good?
The file will be:
Qt Code:
  1. <dic>
  2. <word freq="0.000002"> Hello </word>
  3. //all word
  4. </dic>
To copy to clipboard, switch view to plain text mode 
is it better do in this way: ??
Qt Code:
  1. <dic>
  2. <word>
  3. Hello
  4. <freq>
  5. 0.000002
  6. </freq>
  7. </word>
  8. //al word
  9. </dic>
To copy to clipboard, switch view to plain text mode 
What will be the better?
In the end I have to read it and fill my structures (basically my class Dictionary).
Furthermore: is all this approach ok?

thanks,