title: Type mismatch: cannot convert from Element to Elements & first cannot be resolved or is not a field
body: <p>I'm attempting to build a HTML parser and I'm getting two errors stating:</p>
  
  <pre><code>Type mismatch: cannot convert from Element to Elements  MainActivity.java   /test/src/com/example/test  line 55 Java Problem
  first cannot be resolved or is not a field  MainActivity.java   /test/src/com/example/test  line 54 Java Problem
  </code></pre>
  
  <p>on the lines: </p>
  
  <pre><code>Elements th = doc.select("tr").first;
  Elements firstTh = th.select("th").first();
  </code></pre>
  
  <p>Does anyone know why this might be happening or what I can do to resolve this issue? It's my first time building a parser so I'm not sure exactly what I've done wrong. </p>
  
  <pre><code>package com.example.test;
  
  import java.io.BufferedReader;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.io.IOException;
  
  import org.jsoup.Jsoup;
  import org.jsoup.nodes.Document;
  import org.jsoup.nodes.Element;
  import org.jsoup.select.Elements;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.impl.client.DefaultHttpClient;
  
  import android.app.Activity;
  import android.app.ProgressDialog;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.TextView;
  
  public class MainActivity extends Activity {
  
      TextView tv;
      final String URL = "http://exampleurl.com";
  String tr;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          tv = (TextView) findViewById(R.id.TextView01);
          new MyTask().execute(URL);
      }
  
      private class MyTask extends AsyncTask&lt;String, Void, String&gt; {
          ProgressDialog prog;
          String title = "";
  
          @Override
          protected void onPreExecute() {
              prog = new ProgressDialog(MainActivity.this);
              prog.setMessage("Loading....");
              prog.show();
          }
  
          @Override
          protected String doInBackground(String... params) {
              try {
                  Document doc = Jsoup.connect(params[0]).get();
                  Elements tableElement = doc.select(".datagrid");
                  Elements th = doc.select("tr").first;
                  Elements firstTh = th.select("th").first();
                  title = firstTh.text();
          }   catch (IOException e) {
                  e.printStackTrace();
              }
              return title;
          }
  
          @Override
          protected void onPostExecute(String result) {
              super.onPostExecute(result);
              prog.dismiss();
              tv.setText(result);
          }
      }
  }
  </code></pre>