Java has a large set of APIs to parse HTML. To extract data from HTML and perform any manipulation we should be able to parse it.
jsoup provides a very easy to use , powerful and compact API to pare HTML and extract data. It supports DOM, CSS and jquery like selectors.
It is designed for all types of HTML and will even parse HTML which is not perfectly valid.
jsoup provides a very easy to use , powerful and compact API to pare HTML and extract data. It supports DOM, CSS and jquery like selectors.
It is designed for all types of HTML and will even parse HTML which is not perfectly valid.
Example
Document doc = soup.connect("http://www.bbc.co.uk/sport/0/").get();
Elements newsHeadlines = doc.select("#more-news-headlines li");
Elements newsHeadlines = doc.select("#more-news-headlines li");
We can also provide HTML directly in a string.
A detailed documentation is available at jsoup website. You may start from official cook book available here.
API Development Company UK, API Development Company USA, API Development Company India
ReplyDelete