101
Jsoup API
There are 6 packages in jsoup api providing classes and interfaces for developing jsoup application.
- org.jsoup
- org.jsoup.examples
- org.jsoup.helper
- org.jsoup.nodes
- org.jsoup.parser
- org.jsoup.safety
- org.jsoup.salect
There are many classes in the above packages. The main classes of jsoup api are given below:
- Jsoup
- Document
- Element
Jsoup class
The org.jsoup.Jsoup class provides methods to connect, clean and parse the HTML document.
The important methods of Jsoup class are given below:
Method | Description |
---|---|
static Connection connect(String url) | create and returns connection of URL. |
static Documentparse(File in, String charsetName) | parses the specified charset file into document. |
static Documentparse(File in, String charsetName, String baseUri) | parses the specified charset and baseUri file into document. |
static Documentparse(String html) | parses the given html code into document. |
static Documentparse(String html, String baseUri) | parses the given html code with baseUri into document. |
static Documentparse(URL url, int timeoutMillis) | parses the given URL into document. |
static String clean(String bodyHtml, Whitelist whitelist) | returns safe HTML from input HTML, by parsing input HTML and filtering it through a white-list of permitted tags and attributes. |
Next TopicJsoup Examples