0%

Book Description

Effectively extract and manipulate HTML content with the Jsoup library

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results
  • Manipulate real-world HTML
  • Discover all the features supported by the Jsoup library
  • Learn how to Extract and Validate HTML data

In Detail

As you might know, there are a lot of Java libraries that support parsing HTML content out there. Jsoup is yet another HTML parsing library, but it provides a lot of functionalities and boasts much more interesting features when compared to others. Give it a try, and you will see the difference!

Instant Jsoup How-to provides simple and detailed instructions on how to use the Jsoup library to manipulate HTML content to suit your needs. You will learn the basic aspects of data crawling, as well as the various concepts of Jsoup so you can make the best use of the library to achieve your goals.

Instant Jsoup How-to will help you learn step-by-step using real-world, practical problems. You will begin by learning several basic topics, such as getting input from a URL, a file, or a string, as well as making use of DOM navigation to search for data. You will then move on to some advanced topics like how to use the CSS selector and how to clean dirty HTML data. HTML data is not always safe, and because of that, you will learn how to sanitize the dirty documents to prevent further XSS attacks.

Instant Jsoup How-to is a book for every Java developer who wants to learn HTML manipulation quickly and effectively. This book includes the sample source code for you to refer to with a detailed explanation of every feature of the library.

Table of Contents

  1. Instant Jsoup How-to
    1. Instant Jsoup How-to
    2. Credits
    3. About the Author
    4. About the Reviewers
    5. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    7. 1. Instant Jsoup How-to
      1. Giving input for parser (Must know)
        1. How to do it...
        2. How it works...
        3. There's more...
      2. Extracting data using DOM (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      3. Extracting data using CSS selector (Must know)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Transforming HTML elements (Must know)
        1. How to do it...
        2. How it works...
        3. There's more...
      5. Miscellaneous Jsoup options (Should know)
        1. How to do it...
        2. There's more...
      6. Cleaning dirty HTML documents (Become an expert)
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Tags removed in <head>
      7. Listing all URLs within an HTML page (Should know)
        1. How to do it...
        2. How it works...
        3. There's more...
      8. Listing all images within an HTML page (Should know)
        1. How to do it...
        2. How it works...
3.140.198.173