永发信息网

java中解析html代码提取字符串

答案:4  悬赏:80  手机版
解决时间 2021-01-14 18:27
  • 提问者网友:遁入空寂
  • 2021-01-14 02:02
java中解析html代码提取字符串
最佳答案
  • 五星知识达人网友:渊鱼
  • 2021-01-14 02:39
package test;

public class JButtonTest
{
public static void main ( String[] args )
{
String regex = "[\s\S]+\]+\>([^\<]+)\<\/property\>[\s\S]*";
String input = "
projectNo


 projectNo


 项目编号

";
System.out.println (input.replaceAll (regex, "$1"));
}
}
全部回答
  • 1楼网友:duile
  • 2021-01-14 06:55
Java代码  
iv=(ImageView)this.findViewById(R.id.iv);  
            iv.setTag("toRight");  
            iv.setOnClickListener(listener);  
            ani_0 = new TranslateAnimation(  
                    Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f,  
                    Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f);  
            ani_1= new TranslateAnimation(  
                    Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f,  
                    Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f);  
            ani_0.setInterpolator(new AccelerateDecelerateInterpolator());     
            ani_0.setDuration(1000);  
            ani_0.setFillEnabled(true);  
            ani_0.setFillAfter(true);  
            ani_0.setAnimationListener(animationListener);  
            ani_1.setInterpolator(new AccelerateDecelerateInterpolator());     
            ani_1.setDuration(1000);  
            ani_1.setFillEnabled(true);  
            ani_1.setFillAfter(true);
  • 2楼网友:夜余生
  • 2021-01-14 04:02
转成xml就简单多了。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯