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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:39:11+00:00 2026-05-25T10:39:11+00:00

I have a problem when trying to parse a webpage using jSoup. If I

  • 0

I have a problem when trying to parse a webpage using jSoup. If I view the page source in chrome, there is all the content you’d expect – the full page. However, when I connect to the url with JSoup, the Jsoup Document only contains a small amount of the page’s html/xml.

Any idea why this is?

Below is an example of the differences:

Page source:

<title>Bath Rugby Official Website | First team</title> 
<base href="http://www.bathrugby.com/"></base> 
<meta name="description" content="The Official Website of Bath Rugby. The only place     for in-depth player, match and club news." /><meta property="og:title" content="Bath Rugby     Official Website | First team" /><meta property="og:url"     content="http://www.bathrugby.com/fixtures-and-results/first-team/" /> 
<meta property="og:type" content="sports_team" /> 
<!-- <meta property="og:image"     content="http://www.bathrugby.com/_assets/img/common/bath_rugby_logo.jpg" /> --> 
<meta property="og:site_name" content="Bath Rugby" /> 
<meta property="fb:admins" content="100001941260923" /> 


<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Latest News - RSS feed" href="/rss/rss-all-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Match News - RSS   feed" href="/rss/rss-match-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Team News - RSS feed" href="/rss/rss-team-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Club News - RSS feed" href="/rss/rss-club-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Academy News - RSS feed" href="/rss/rss-academy-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Ladies News - RSS feed" href="/rss/rss-ladies-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Community News - RSS feed" href="/rss/rss-community-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Programmes and Projects - Inclusion - RSS feed" href="/rss/rss-programmes-and-projects-inclusion.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Programmes and Projects - Education - RSS feed" href="/rss/rss-programmes-and-projects-education.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Programmes and Projects - Sports - RSS feed" href="/rss/rss-programmes-and-projects-sport.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Corporate News - RSS feed" href="/rss/rss-corporate-news.rss" /> 
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Redevelopment News - RSS feed" href="/rss/rss-redevelopment-news.rss" /> 

JSoup Document:

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  <title>Bath Rugby - Fixtures and results</title> 
  <meta name="Author" content="Positive -&gt; http://www.positivestudio.co.uk" /> 
  <meta name="HandheldFriendly" content="True" /> 
  <meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> 
   <meta name="google-site-verification" content="7dRcSqMI5R3Rag9iNiHeFei6ycyBTd3dmhlZvF8QdhA" /> 
   <link rel="Shortcut Icon" type="image/ico" href="/_assets/favicon.ico" /> 
  <link rel="apple-touch-icon-precomposed" href="/_assets/img/icons/apple-touch-icon.png" /> 
   <link rel="stylesheet" type="text/css" media="all" href="/_assets/css/mobile.css" /> 
   <link rel="stylesheet" type="text/css" href="/_assets/css/retina.css" media="only screen and (-webkit-min-device-pixel-ratio: 2)" /> 
  <script type="text/javascript" src="/_assets/js/jquery-1.4.2.min.js"></script> 
   <script src="/_assets/js/css_browser_selector.js" type="text/javascript"></script> 
  <script type="text/javascript" src="/_assets/js/scripts.js"></script> 
  <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-24788688-3']);
    _gaq.push(['_trackPageview']);

  (function() {
  • 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-25T10:39:11+00:00Added an answer on May 25, 2026 at 10:39 am

    I answered this by retrieving the page’s source html as a string, then passing this to jSoup.

    HttpClient client = new DefaultHttpClient();
                HttpGet request = new HttpGet(url);
                HttpResponse response = client.execute(request);
    
                String html = "";
                InputStream in = response.getEntity().getContent();
                BufferedReader reader = new BufferedReader(new     InputStreamReader(in));
                StringBuilder str = new StringBuilder();
                String line = null;
                while((line = reader.readLine()) != null)
                {
                    str.append(line);
                }
                in.close();
                html = str.toString();              
    
                doc = Jsoup.parse(html);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse some text using PyParser. The problem is that I have
I have a problem when trying to execute this update statement (below) using C#
Hey all, i have a problem with trying to get 2 forms to close
I have a problem with a page where I am trying to get colorbox
I'm trying to parse a webpage using open-uri + hpricot but it seems to
I am trying to parse dirty input into postgres tables. I have a problem
I'm trying to parse some html using jsoup (1.3.3) in my android activity. When
I have a problem when trying to parse an XML from a string. I'm
I'm trying to parse some html and I have some problem with this little
I have been trying to parse this ( http://app.calvaryccm.com/mobile/android/v1/devos ) URL using a SAX

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.