How to parse HTML on andriod

We all know that programming have endless possibilities.There are numbers of solutions available for a single problem so i think all of the above solutions are perfect and may be helpful for someone but for me this one save my day..

So Code goes like this:

 private void getWebsite() {
    new Thread(new Runnable() {
      public void run() {
        final StringBuilder builder = new StringBuilder();

        try {
          Document doc = Jsoup.connect("").get();
          String title = doc.title();
          Elements links ="a[href]");


          for (Element link : links) {
            builder.append("\n").append("Link : ").append(link.attr("href"))
            .append("\n").append("Text : ").append(link.text());
        } catch (IOException e) {
          builder.append("Error : ").append(e.getMessage()).append("\n");

        runOnUiThread(new Runnable() {
          public void run() {

You just have to call the above function in onCreate Method of your MainActivity