JSoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods.
Here are the simple steps to play around with this api.
#1. Add below dependency entry in the pom.xml
# 2. Execute the below commands to reflect the changes and ready to use the api.
clean compile install
#3. Right click on the project — Java Build Path – tick mark the Jsoup jar entry
#4. Add the jar in the Deployment Assembly section
Click OK button.
#5. Create a Java class and play around with JSoup API. Here is an sample java file.
Here is an result screen shot for reference.
Some of the useful resources here.
JSoup home here.
Download Jar or dependencies reference here.
JSoup cook book here.
JSoup api reference here.
Open Source HTML Parsers in Java
stackoverflow – Which HTML Parser is the best.
Comparison of HTML parsers here
Compare Best “HTML Parsers” in Java.
Keep watching this space for more updates
Have a nice day 🙂