Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8127317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:28:58+00:00 2026-06-06T07:28:58+00:00

I am reading the Head First Android development book. In the third chapter where

  • 0

I am reading the Head First Android development book. In the third chapter where they try to make an app from NASA RSS feed from here .
In the book the author uses SAX parser for Java. I looked online and some of the answers here on SO suggest that SAX is outdated and there are newer solutions.

However I’m not sure what the easier to use ones are for Java. I have used Nokogiri for Ruby and something similar would be awesome. I looked at jsoup and it looked alright, but I am wondering what suggestions you guys might have.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:29:00+00:00Added an answer on June 6, 2026 at 7:29 am

    I’m a big fan of Jsoup. I only recently started using it and its amazing. I used to write some super hairy regex patterns to do pattern matching with because I wanted to avoid SAX like the plague… and that was quite tedious as you can imagine. Jsoup let me parse out specific items from a <table> in just a few lines of code.

    Let’s say I want to take the first 7 rows of a table where the <tr class=…> is GridItem or GridAltItem. Then, lets say we want to print the 1st, 2nd, and 3rd columns as text and then the first <a href> link that appears in the row. Sounds goofy, but I had to do this and I can do this easily:

    String page = "... some html markup fetched from somewhere ...";
    Document doc = Jsoup.parse(page);
    for(int x=0; x< 7; x++) {
      Element gridItem = doc.select("tr[class$=Item]").select("tr").get(x);
      System.out.println("row: " + gridItem.select("td").get(0).text() + " " + gridItem.select("td").get(1).text() + " " + gridItem.select("td").get(4).text() + " " + gridItem.select("a").get(0).attr("href"));
    }
    

    Its that simple with Jsoup. Make sure you add the Jsoup jar file to your project as a library and import those classes which you need: you don’t want to import the wrong Document or Element class…

    import org.jsoup.Jsoup;
    import org.jsoup.nodes.Document;
    import org.jsoup.nodes.Element;
    

    Enjoy!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A quote from the book I'm reading Head First Java : The point is
i'm reading this book (Head First Object Oriented Design & Analysis). In chapter 5
I'm currently reading Head First's Object Oriented Analysis and Design. The book states that
I'm really new at Ruby on Rails development. I'm reading Head First Rails and
After reading the most excellent book Head First Design Patterns, I began proselytizing to
I am reading Head First Design Pattern and at chapter of Factory. I am
After reading the Head First Design Patterns book and using a number of other
I'm reading through head first design patterns at the moment and while the book
I was reading Head First Java - pretty cool book to get started on
All the online references and head first JSP&Servlet book I'm reading state the characteristic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.