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:
<dic>
<word freq="0.000002"> Hello </word>
//all word
</dic>
<dic>
<word freq="0.000002"> Hello </word>
//all word
</dic>
To copy to clipboard, switch view to plain text mode
is it better do in this way: ??
<dic>
<word>
Hello
<freq>
0.000002
</freq>
</word>
//al word
</dic>
<dic>
<word>
Hello
<freq>
0.000002
</freq>
</word>
//al word
</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,
Bookmarks