Android: 解析Html code

1. 利用Jsope来解析html code :

Document doc = Jsoup.parse(htmlCode);

         Elements links = doc.select("script");     
         
        String text2 ="";
         
         for (Element link : links)
         {               
              text2 = link.toString();             
             
              text2 = text2.replaceAll(":", ":");
              text2= text2.replaceAll("@", "@");
              text2= text2.replaceAll("=", "=");
              text2= text2.replaceAll("&#59;", ";");
              text2 =text2.replaceAll("%", "%");
              break;
         }

2. Jsope 的官网:

http://jsoup.org/

3. Jsope(Jar, document)的下载地址:

http://jsoup.org/packages/jsoup-1.6.1-javadoc.jar
原文地址:https://www.cnblogs.com/Jessy/p/2399972.html