jsoup - Tutorial #1 setup, basic commands

in utopian-io •  7 months ago


What Will You Learn?
In this tutorial you will learn about jsoup. Its basic elements and development.

What is jsoup
jsoup is a Java based library to work with HTML based content. It provides a very convenient API to extract and manipulate data, using the best of DOM, CSS, and jquery-like methods. It implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.

Requirements

  • Basic Java Programming
  • Good OOP Concept is a plus point for you
  • Difficulty

  • Intermediate
  • jsoup - Overview
    jsoup is a Java based library to work with HTML based content. It provides a very convenient API to extract and manipulate data, using the best of DOM, CSS, and jquery-like methods. It implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers do.

  • jsoup libary implements the WHATWG HTML5 specification, and parses an HTML content to the same DOM as per the modern browsers.
  • jsonp library provides following functionalities.
  • Multiple Read Support - It reads and parses HTML using URL, file, or string.
  • CSS Selectors It can find and extract data, using DOM traversal or CSS selectors.
  • DOM Manipulation It can manipulate the HTML elements, attributes, and text.
  • Prevent XSS attacksIt can clean user-submitted content against a given safe white-list, to prevent XSS attacks.

    TidyIt outputs tidy HTML.

  • Handles invalid data - jsoup can handle unclosed tags, implicit tags and can reliably create the document structure.
  • Local Environment Setup
    JUnit is a framework for Java, so the very first requirement is to have JDK installed in your machine.

    System Requirement

    Step 1: Verify Java Installation in Your Machine

    Step 2: Set JAVA Environment

    Step 3: Download jsoup Archive

    Step 4: Set jsoup Environment

    Step 5: Set CLASSPATH Variable
    5.png

    Source: Tutorialspoint.com

    Authors get paid when people like you upvote their post.
    If you enjoyed what you read here, create your account today and start earning FREE STEEM!
    Sort Order:  

    Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
    https://www.tutorialspoint.com/jsoup/jsoup_overview.htm

    Loading...