what method in jsoup can return the modified html?
问题 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!!! 回答1: You could write the contents of either document.toString() or document.outerHtml() to file, where document is got from Document document = Jsoup.connect("http://...").get(); // any document modifications... like so: BufferedWriter htmlWriter = new