Here you can find the source of parse(final String html)
Parameter | Description |
---|---|
html | The HTML code to parse. |
public static Document parse(final String html)
//package com.java2s; /*//from ww w .j av a2 s . com * Copyright (C) 2012 Klaus Reimer <k@ailis.de> * See LICENSE.md for licensing information. */ import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class Main { /** * Parses the specified html code. * * @param html * The HTML code to parse. * @return The parsed document. */ public static Document parse(final String html) { Document doc = Jsoup.parseBodyFragment(html); doc.outputSettings().prettyPrint(false); return doc; } }