0
How can I export List<Entry> to html? How to solve this?
Exports (writes) a valid HTML document to <code>htmlFile</code>, containing readable HTML representations of the given <code>Entry</code> objects form the <code>List</code> of entries. @param entries The <code>List</code> of <code>Entry</code> objects to export @param htmlFile The file to write the data to public void exportAsHtml(List<Entry> entries, File html File) { Code? }
2 Respuestas
0
ooooh i get it, make sure to clean your question first. so its easier for the others to understand what your question is.
you're given List, and File as parameter.
i assume the file here is the destination file.
first create a printwriter object (you can use other io class, but i personally prefer this one) with the File given as the target output.
ex.
PrintWritter tohtml=new PrintWriter(file);
next is loop through the list, you can use any method you want, foreach, while, for, etc.
in each itteration write a valid html tags using the writer object we created earlier.
ex.
tohtml.println("<li>"+entry+"</li>");
thats all, i think. good luck with your project
0
Thank you!