首页 > 代码库 > Java解析HTML标签Tag
Java解析HTML标签Tag
import java.util.HashMap; import java.util.Map; public class TagParser { private Integer index = 0; private char[] tagChar; private int position = 0; /* 解析符号 */ private char symbol = '"'; public static final String START_SCRIPT = "<script"; public static final String END_SCRIPT = ">"; public static final String END_SCRIPT_1 = "/>"; public static final String EQ = "="; public static final char SPACE = ' '; public static final String MUST_SPACE = " "; public static final String TAB = " "; public static final String SYMBOL = "'"; private DFAStatus status; private Map<Integer, Entity> map = new HashMap<Integer, Entity>(); private Map<String, String> result = new HashMap<String, String>(); public static void main(String[] args) throws SymbolError { String tag = "<script filter=\"a\'\" type=\"text/javascript\" id='node' src=http://www.mamicode.com/"http://www.test.com/abc.js/" async=/"true/" />";>Java解析HTML标签Tag
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。