in reply to Better Code Solution needed for the below CSV file parsing and printing in HTML format
Moreover, if you look closely at the .html output you posted, you'll note that it's NOT valid:
...<table order=1> <tr> <td>ID</td> <td>NAME</td> <td>AGE</td> # </tr> missing here <tr> <td>1</td> <td>Alex</td> ...
NOR do I see any ready explanation of how your code(1) could have produced this output. Did you cut and paste accurately? And what, in your view, causes the second to fail as it does? That may (update: already answered by jethro) help you ascertain your problem without further coaching.
Finally, perhaps you can explain what you mean by "...it should be generic not like method1."
|
|---|