title: Android HTML Jsoup
body: <p>Im trying to get the absolute URLs for images from my collages news website but have so far been unsuccessful. I am working from this site <a href="http://www.dcu.ie/news/index.shtml" rel="nofollow">http://www.dcu.ie/news/index.shtml</a>. As you can see from the source the first image has the absolute URL but the remainder only have the relative URLs. I have tried examples from Jsoups documentation but cant get it to work. This displays the first image and then empty boxes for the rest. I'd appreciate any help possible.Thanks</p>
  
  <pre><code>public class NewsActivity extends Activity {
      WebView mWebView;
      String test2 = "&lt;html&gt;&lt;body&gt;";
      Document docs;
      public void main(String... args) 
          {
          try 
          {
          docs = Jsoup.connect("http://www.dcu.ie/news/index.shtml").get();
      } 
          catch (IOException e) 
          {
          e.printStackTrace();
      }
          Elements imgs = docs.select("img[src$=.jpg]");
          for (Element img : imgs) 
          {
              String url = img.toString();
              test2 = test2 + " " + url + " ";
          }
          public void onCreate(Bundle savedInstanceState) {
          main();
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          mWebView = (WebView) findViewById(R.id.webview);
          mWebView.setWebViewClient(new NewsClient());
          mWebView.getSettings().setJavaScriptEnabled(true);
          mWebView.getSettings().setDomStorageEnabled(true);
          mWebView.loadData(test2, "text/html", "utf-8");
      }
  }
  </code></pre>