Search code examples
androidhtmljsonparsinghref

Json Parsing from url


I 'm trying to get the links from the following HTML but I cannot, because the site uses the same name for all classes (this only a small part from the site's HTML code).

<td class="td-file"><span class="td-value"  
id="JOT_FILECAB_label_wuid:gx:4c83ae813389c090" aria-hidden="true">
Ε.ΛΣΧ.ΑΕΝ.02 ΑΠΟ 22-2-2016.pdf</span><br />
<SPAN style="word-spacing: 3px;">
<a href="https://docs.google.com/viewer?a=v&amp;pid=sites&amp;srcid=ZGVmYXVsdGRvbWFpbnxhZW5tYWttZWNofGd4OjRjODNhZTgxMzM4OWMwOTA" dir="ltr" target="_blank">Προβολή</a> 
<a href="/site/aenmakmech/tmemata/%CE%95.%CE%9B%CE%A3%CE%A7.%CE%91%CE%95%CE%9D.02%20%CE%91%CE%A0%CE%9F%2022-2-2016.pdf?attredirects=0&amp;d=1" dir="ltr">Λήψη</a>
</SPAN></td>

Any suggestion?


Solution

  • Try this (you updated the question after I posted this answer. I have no idea how to do this in Android)

    <html>
    //// this is your html content
    
     </html>
        <script type="text/javascript">
        $("a").each(function(){ 
          alert(this.href);
        });
         </script>