Here you can find the source of parse(String html)
Parameter | Description |
---|---|
html | input html |
public static Document parse(String html)
//package com.java2s; //License from project: Open Source License import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class Main { private static Document.OutputSettings setting; /**//from w w w .ja v a2 s .co m * convert html String to {@link Document} (A lot more easier to manage it) * * @param html * input html * @return Document (include html body and head Tag) * @see Document * @see Document#head() * @see Document#body() */ public static Document parse(String html) { Document document = Jsoup.parse(html); if (setting != null) return document.outputSettings(setting); return document; } }