Created a program based on an example from Android Begin . Removed all unnecessary to redo it to fit your needs. But the fact is that the table is inside the table first in order. It turned out such nonsense (which by itself did not start):
MainActivity.java
package com.kovalev.jsoupkakiepary; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import android.app.Activity; import android.app.ProgressDialog; import android.os.AsyncTask; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.ListView; public class MainActivity extends Activity { ListView listview; ListViewAdapter adapter; ProgressDialog mProgressDialog; ArrayList < HashMap < String, String >> arraylist; static String RANK = "rank"; static String COUNTRY = "country"; static String POPULATION = "population"; static String FLAG = "flag"; // URL Address String url = "http://www.kakiepary.ru/archive/num/45/"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); new JsoupListView().execute(); } private class JsoupListView extends AsyncTask < Void, Void, Void > { @Override protected void onPreExecute() { super.onPreExecute(); // Create a progressdialog mProgressDialog = new ProgressDialog(MainActivity.this); // Set progressdialog title mProgressDialog.setTitle("KakiePary"); // Set progressdialog message mProgressDialog.setMessage("Загрузка..."); mProgressDialog.setIndeterminate(false); // Show progressdialog mProgressDialog.show(); } @Override protected Void doInBackground(Void...params) { // Create an array arraylist = new ArrayList < HashMap < String, String >> (); try { // Connect to the Website URL Document doc = Jsoup.connect(url).get(); // Identify Table Class "worldpopulation" for (Element table: doc.select("table[id=child_time]")) { // Identify all the table row's(tr) for (Element row: table.select("tr:gt(0)")) { HashMap < String, String > map = new HashMap < String, String > (); // Identify all the table cell's(td) Elements tds = row.select("td"); // Retrive Jsoup Elements // Get the first td map.put("rank", tds.get(0).text()); // Get the second td map.put("country", tds.get(1).text()); // Get the third td map.put("population", tds.get(2).text()); // Set all extracted Jsoup Elements into the array arraylist.add(map); } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void result) { // Locate the listview in listview_main.xml listview = (ListView) findViewById(R.id.listview); // Pass the results into ListViewAdapter.java adapter = new ListViewAdapter(MainActivity.this, arraylist); // Set the adapter to the ListView listview.setAdapter(adapter); // Close the progressdialog mProgressDialog.dismiss(); } } } ListViewAdapter.java
package com.kovalev.jsoupkakiepary; import java.util.ArrayList; import java.util.HashMap; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; public class ListViewAdapter extends BaseAdapter { // Declare Variables Context context; LayoutInflater inflater; ArrayList < HashMap < String, String >> data; HashMap < String, String > resultp = new HashMap < String, String > (); public ListViewAdapter(Context context, ArrayList < HashMap < String, String >> arraylist) { this.context = context; data = arraylist; } @Override public int getCount() { return data.size(); } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } public View getView(final int position, View convertView, ViewGroup parent) { // Declare Variables TextView rank; TextView country; TextView population; inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View itemView = inflater.inflate(R.layout.listview_item, parent, false); // Get the position resultp = data.get(position); // Locate the TextViews in listview_item.xml rank = (TextView) itemView.findViewById(R.id.rank); country = (TextView) itemView.findViewById(R.id.country); population = (TextView) itemView.findViewById(R.id.population); // Capture position and set results to the TextViews rank.setText(resultp.get(MainActivity.RANK)); country.setText(resultp.get(MainActivity.COUNTRY)); population.setText(resultp.get(MainActivity.POPULATION)); // Capture ListView item click itemView.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // Get the position resultp = data.get(position); Intent intent = new Intent(context, SingleItemView.class); // Pass all data rank intent.putExtra("rank", resultp.get(MainActivity.RANK)); // Pass all data country intent.putExtra("country", resultp.get(MainActivity.COUNTRY)); // Pass all data population intent.putExtra("population", resultp.get(MainActivity.POPULATION)); // Start SingleItemView Class context.startActivity(intent); } }); return itemView; } } SingleItemView.java
package com.kovalev.jsoupkakiepary; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget.TextView; public class SingleItemView extends Activity { // Declare Variables String rank; String country; String population; String position; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Get the view from singleitemview.xml setContentView(R.layout.singleitemview); Intent i = getIntent(); // Get the result of rank rank = i.getStringExtra("rank"); // Get the result of country country = i.getStringExtra("country"); // Get the result of population population = i.getStringExtra("population"); // Locate the TextViews in singleitemview.xml TextView txtrank = (TextView) findViewById(R.id.rank); TextView txtcountry = (TextView) findViewById(R.id.country); TextView txtpopulation = (TextView) findViewById(R.id.population); // Set results to the TextViews txtrank.setText(rank); txtcountry.setText(country); txtpopulation.setText(population); } } I just don’t understand how to select a table inside the table. Here is the link to the page I'm trying to parse. Help what you can and in more detail, if possible.