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 8803351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:19:07+00:00 2026-06-14T01:19:07+00:00

I have a Java application that will parse html pages and extract data from

  • 0

I have a Java application that will parse html pages and extract data from them. Currently, I have a class that acts as template or instructions on how to read a specific web page. The application will need to read from several different sites that will be formatted differently. Rather than creating a new template class for each type of format, I’d like to be able to read an accompanying XML file (or another document) that will provide the instructions as to which data and where to extract.

I’ve attempted to search the internet on how to do this, but I’m guessing I’m not asking the right question or using the right keywords.

The solution doesn’t have to use XML as the template, but it was my first thought.

Can anyone point me in the right direction?

  • 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-14T01:19:09+00:00Added an answer on June 14, 2026 at 1:19 am

    An Extractor uses ExtractionInstructions to extract the data of interest from a single source. You can later retrieve the extracted data from the extractor.

    In this high-level design

    • Source: Each page that you want to extract the same data from
    • Extractor: 1 instance for each extraction run on a single source
    • ExtractionInstructions: A set of instructions unambiguously describing a way to extract data from a single source.
      • You can specify the instructions unambiguously by
        • tag id and/or
        • Using CSS 3 selectors and/or
        • xpath etc.
      • You can use a combination of all the above by chaining them together (chain of responsibility pattern) to have more percentage of success. Idea is if the data is not found using 1 type of extraction, then you can try with other options until you either find the data or you ran out of the instructions).

    I suggest using JSoup as the base library to build these abstractions.

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

Sidebar

Related Questions

I have to develop a Java ME (formerly known as J2ME) application that will
I have a JSP java application that has a name AAA-master so currently my
I have a java application that will take the image as an input and
I have a Java web application that currently uses Log4J for logging. I'd like
I am currently using the java.nio.channel.Selectors & SocketChannels for a application that will open
I have a Java application that run as a background service, i.e. no GUI.
I have a java application that people can log into (and do various things
I have a java application that runs out of memory, but I have no
I have a Java application that makes heavy use of a large file, to
I have a Java application that is managed using Maven. The project involves the

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.