Here you can find the source of prettyPrint(String html)
public static String prettyPrint(String html)
//package com.java2s; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class Main { public static String prettyPrint(String html) { Document doc = Jsoup.parse(html); doc.outputSettings().prettyPrint(true); return doc.toString(); }/*from w ww .java 2s. c o m*/ }