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

  • SEARCH
  • Home
  • 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 575199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:54:52+00:00 2026-05-13T13:54:52+00:00

I want to do some screen scraping, ideally using CSS selectors and not XPath.

  • 0

I want to do some screen scraping, ideally using CSS selectors and not XPath. Is there a library similar to ones in Ruby or Python?

  • 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-05-13T13:54:53+00:00Added an answer on May 13, 2026 at 1:54 pm

    There are dozen of screen scraping library written in Java. Just to cite a few :

    • TagSoup – a SAX-compliant parser written in Java that, instead
      of parsing well-formed or valid XML,
      parses HTML as it is found in the
      wild: nasty and brutish, though quite
      often far from short. TagSoup is
      designed for people who have to
      process this stuff using some
      semblance of a rational application
      design. By providing a SAX interface,
      it allows standard XML tools to be
      applied to even the worst HTML.
    • Jericho HTML Parser – Jericho HTML Parser is a simple but powerful
      java library allowing analysis and
      manipulation of parts of an HTML
      document, including some common
      server-side tags, while reproducing
      verbatim any unrecognised or invalid
      HTML. It also provides high-level HTML
      form manipulation functions. t is
      neither an event nor tree based
      parser, but rather uses a combination
      of simple text search, efficient tag
      recognition and a tag position cache.
      The text of the whole source document
      is first loaded into memory, and then
      only the relevant segments searched
      for the relevant characters of each
      search operation.
    • HTML Cleaner – HtmlCleaner reorders individual elements and
      produces well-formed XML from dirty
      HTML. It follows similar rules that
      the most of web-browsers use in order
      to create document object model. A
      user may provide custom tag and rule
      set for tag filtering and balancing.
    • NekoHTML – NekoHTML is a simple HTML scanner and tag balancer that
      enables application programmers to
      parse HTML documents and access the
      information using standard XML
      interfaces. The parser can scan HTML
      files and “fix up” many common
      mistakes that human (and computer)
      authors make in writing HTML
      documents. NekoHTML adds missing
      parent elements; automatically closes
      elements with optional end tags; and
      can handle mismatched inline element
      tags.

    And many more at HTML Screen Scraping Tools written in Java. But these are IMO the best to deal with any kind of content (understand all kind of crap) as I mentioned in this previous answer. This might not be an issue for you though.

    Just in case, maybe check out the thread Nokogiri pure Java status.

    Update: A new project has been released (the 2010-01-31), jsoup, which offers a selector-syntax to find elements. See its website for more details and/or this answer from its author.

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

Sidebar

Ask A Question

Stats

  • Questions 357k
  • Answers 357k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The other answers are correct. Here is some code you… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer you ruin the noConflict concept by reassigning the jquery to… May 14, 2026 at 9:40 am
  • Editorial Team
    Editorial Team added an answer If you get that particular error, you don't actually have… May 14, 2026 at 9:40 am

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.