When I parse the html file(stored in native) with jsoup. I have modified some elements in the html file,so I want to save the modified html, and replace the old one?
Do any body know which method in jsoup can do the job?
Thank you so much!!!
You could write the contents of either
to file, where
document is got from
Document document = Jsoup.connect("http://...").get(); // any document modifications...
BufferedWriter htmlWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8")); htmlWriter.write(document.toString());