亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lexertests.java

?? html解析包 可以很方便的解析html 純java 實現
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        mAcceptable.add ("FORM");        mAcceptable.add ("INPUT");        mAcceptable.add ("!DOCTYPE");        mAcceptable.add ("TBODY");        mAcceptable.add ("B");        mAcceptable.add ("DIV");        mAcceptable.add ("SCRIPT");        mAcceptable.add ("NOSCRIPT");        mAcceptable.add ("STYLE");        mAcceptable.add ("SPAN");        mAcceptable.add ("UL");        mAcceptable.add ("LI");        mAcceptable.add ("IFRAME");    }    /**     * Test case for bug #789439 Japanese page causes OutOfMemory Exception     * No exception is thrown in the current version of the parser,     * however, the problem is that ISO-2022-JP (aka JIS) encoding sometimes     * causes spurious tags.     * The root cause is characters bracketed by [esc]$B and [esc](J (contrary     * to what is indicated in then j_s_nightingale analysis of the problem) that     * sometimes have an angle bracket (&lt; or 0x3c) embedded in them. These     * are taken to be tags by the parser, instead of being considered strings.     * <p>     * The URL refrenced has an ISO-8859-1 encoding (the default), but     * Japanese characters intermixed on the page with English, using the JIS     * encoding. We detect failure by looking for weird tag names which were     * not correctly handled as string nodes.     * <p>     * Here is a partial dump of the page with escape sequences:     * <pre>     * 0002420 1b 24 42 3f 79 4a 42 25 47 25 38 25 2b 25 61 43     * 0002440 35 44 65 43 44 1b 28 4a 20 77 69 74 68 20 43 61     * ..     * 0002720 6c 22 3e 4a 53 6b 79 1b 24 42 42 50 31 7e 25 5a     * 0002740 21 3c 25 38 1b 28 4a 3c 2f 41 3e 3c 50 3e 0a 3c     * ..     * 0003060 20 69 1b 24 42 25 62 21 3c 25 49 42 50 31 7e 25     * 0003100 5a 21 3c 25 38 1b 28 4a 3c 2f 41 3e 3c 50 3e 0a     * ..     * 0003220 1b 24 42 25 2d 25 3f 25 5e 25 2f 25 69 24 4e 25     * 0003240 5b 21 3c 25 60 25 5a 21 3c 25 38 1b 28 4a 3c 2f     * ..     * 0003320 6e 65 31 2e 70 6c 22 3e 1b 24 42 3d 60 48 77 43     * 0003340 66 1b 28 4a 3c 2f 41 3e 3c 50 3e 0a 2d 2d 2d 2d     * ..     * 0004400 46 6f 72 75 6d 20 30 30 39 20 28 1b 24 42 3e 21     * 0004420 3c 6a 24 4b 31 4a 4a 21 44 2e 24 4a 24 49 1b 28     * 0004440 4a 29 3c 2f 41 3e 3c 49 4d 47 20 53 52 43 3d 22     * </pre>     * <p>     * The fix proposed by j_s_nightingale is implemented to swallow JIS     * escape sequences in the string parser.     * Apparently the fix won't help EUC-JP and Shift-JIS though, so this may     * still be a problem.     * It's theoretically possible that JIS encoding, or another one,     * could be used as attribute names or values within tags as well,     * but this is considered improbable and is therefore not handled in     * the tag parser state machine.     */    public void testJIS ()        throws ParserException    {        Parser parser;        NodeIterator iterator;                parser = new Parser ("http://www.009.com/");        try        {            iterator = parser.elements ();            while (iterator.hasMoreNodes ())                checkTagNames (iterator.nextNode ());        }        catch (EncodingChangeException ece)        {            parser.reset ();            iterator = parser.elements ();            while (iterator.hasMoreNodes ())                checkTagNames (iterator.nextNode ());        }    }    /**     * Check the tag name for one of the ones expected on the page.     * Recursively check the children.     */    public void checkTagNames (Node node)    {        Tag tag;        String name;        NodeList children;                if (node instanceof Tag)        {            tag = (Tag)node;            name = tag.getTagName ();            if (!mAcceptable.contains (name))                fail ("unrecognized tag name \"" + name + "\"");            children = tag.getChildren ();            if (null != children)                for (int i = 0; i < children.size (); i++)                    checkTagNames (children.elementAt (i));        }    }    /**     * See bug #825820 Words conjoined     */    public void testConjoined ()        throws            ParserException    {        StringBuffer buffer;        NodeIterator iterator;        Node node;        String expected;        expected = "The Title\nThis is the body.";        String html1 = "<html><title>The Title\n</title>" +            "<body>This is <a href=\"foo.html\">the body</a>.</body></html>";        createParser (html1);        buffer = new StringBuffer ();        for (iterator = parser.elements (); iterator.hasMoreNodes (); )        {            node = iterator.nextNode ();            String text = node.toPlainTextString ();            buffer.append (text);        }        assertStringEquals ("conjoined text", expected, buffer.toString ());        String html2 = "<html><title>The Title</title>\n" +            "<body>This is <a href=\"foo.html\">the body</a>.</body></html>";        createParser (html2);        buffer = new StringBuffer ();        for (iterator = parser.elements (); iterator.hasMoreNodes (); )        {            node = iterator.nextNode ();            String text = node.toPlainTextString ();            buffer.append (text);        }        assertStringEquals ("conjoined text", expected, buffer.toString ());                String html3 = "<html><title>The Title</title>" +            "<body>\nThis is <a href=\"foo.html\">the body</a>.</body></html>";        createParser (html3);        buffer = new StringBuffer ();        for (iterator = parser.elements (); iterator.hasMoreNodes (); )        {            node = iterator.nextNode ();            String text = node.toPlainTextString ();            buffer.append (text);        }        assertStringEquals ("conjoined text", expected, buffer.toString ());    }    /**     * Check for StackOverflow error.     */    public void testStackOverflow ()        throws            ParserException    {        NodeIterator iterator;        Node node;        String html;                                                                                                                                                                html = "<a href = \"http://test.com\" />";        createParser (html);        for (iterator = parser.elements (); iterator.hasMoreNodes (); )        {            node = iterator.nextNode ();            String text = node.toHtml ();            assertStringEquals ("no overflow", html, text);        }        html = "<a href=\"http://test.com\"/>";        createParser (html);        for (iterator = parser.elements (); iterator.hasMoreNodes (); )        {            node = iterator.nextNode ();            String text = node.toHtml ();            assertStringEquals ("no overflow", html, text);        }        html = "<a href = \"http://test.com\"/>";        createParser (html);        for (iterator = parser.elements (); iterator.hasMoreNodes (); )        {            node = iterator.nextNode ();            String text = node.toHtml ();            assertStringEquals ("no overflow", html, text);        }    }    /**     * See bug #880283 Character "&gt;" erroneously inserted by Lexer     */    public void testJsp () throws ParserException    {        String html;        Lexer lexer;        Node node;                html = "<% out.urlEncode('abc') + \"<br>\" + out.urlEncode('xyz') %>";        lexer = new Lexer (html);        node = lexer.nextNode ();        if (node == null)            fail ("too few nodes");        else            assertStringEquals ("bad html", html, node.toHtml());        assertNull ("too many nodes", lexer.nextNode ());    }        /**     * See bug #899413 bug in javascript end detection.     */    public void testEscapedQuote () throws ParserException    {        String string;        String html;        Lexer lexer;        Node node;                string = "\na='\\'';\n";        html = string + "</script>";        lexer = new Lexer (html);        node = lexer.nextNode (true);        if (node == null)            fail ("too few nodes");        else            assertStringEquals ("bad string", string, node.toHtml());        assertNotNull ("too few nodes", lexer.nextNode (true));        assertNull ("too many nodes", lexer.nextNode (true));    }    /**     * See bug #1227213 Particular SCRIPT tags close too late.     */    public void testCommentInScript () throws ParserException    {        String tag;        String cdata;        String endtag;        String html;        Parser parser;        NodeIterator iterator;        Node node;        tag = "<script>";        cdata = "<!--document.write(\"en\");// -->";        endtag = "</script>";        html = tag + cdata + endtag;        parser = new Parser ();        parser.setInputHTML (html);        iterator = parser.elements ();        node = iterator.nextNode ();        if (node == null)            fail ("too few nodes");        else            assertStringEquals ("bad parse", html, node.toHtml());        assertTrue (node instanceof ScriptTag);        assertStringEquals ("bad cdata", cdata, ((ScriptTag)node).getScriptCode ());        assertNull ("too many nodes", iterator.nextNode ());    }    /**     * See bug #1227213 Particular SCRIPT tags close too late.     * This was actually working prior to the patch, since the     * ScriptScanner didn't use smartquote processing.     * I'm not sure why jwilsonsprings1 said the patch worked     * for him. I can only assume he was mistaken in thinking     * it was the URL that caused the failure.     */    public void testUrlInStyle () throws ParserException    {        String tag;        String cdata;        String endtag;        String html;        Parser parser;        NodeIterator iterator;        Node node;                tag = "<style>";        cdata = ".eSDot {background-image:" +            "url(http://di.image.eshop.msn.com/img/sys/dot.gif)}";        endtag = "</style>";        html = tag + cdata + endtag;        parser = new Parser ();        parser.setInputHTML (html);        iterator = parser.elements ();        node = iterator.nextNode ();        if (node == null)            fail ("too few nodes");        else            assertStringEquals ("bad parse", html, node.toHtml());        assertTrue (node instanceof StyleTag);        assertStringEquals ("bad cdata", cdata, ((StyleTag)node).getStyleCode ());        assertNull ("too many nodes", iterator.nextNode ());    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区日韩精品欧美| 欧美一区二区视频观看视频| 老色鬼精品视频在线观看播放| 亚洲久本草在线中文字幕| 久久久久久亚洲综合影院红桃| 欧美一二三区在线| 日韩一区二区三区精品视频| 欧美高清性hdvideosex| 国产精品久久久久久久久免费樱桃| 日韩欧美视频在线| 日韩一级完整毛片| 欧美电影免费观看高清完整版| 欧美一区二区三区免费观看视频| 91麻豆精品国产91久久久久久久久| 欧美日韩一区二区电影| 欧美日韩在线三级| 欧美日韩大陆在线| 91精品国产综合久久久久久久 | 成人在线一区二区三区| 国产成人午夜精品5599| 成人午夜av电影| 国产精品久久久久久妇女6080| 91在线你懂得| 成人黄色国产精品网站大全在线免费观看 | 99精品欧美一区二区蜜桃免费| caoporm超碰国产精品| 99麻豆久久久国产精品免费| 在线免费一区三区| 欧美日韩一二三区| 精品对白一区国产伦| 中文字幕高清一区| 亚洲制服欧美中文字幕中文字幕| 亚洲mv在线观看| 激情成人综合网| 91视频www| 日韩欧美三级在线| 中文字幕一区二区三区不卡| 亚洲午夜日本在线观看| 欧美在线不卡视频| 日韩三级在线观看| 国产精品久久久久aaaa| 午夜精品123| 丁香婷婷综合激情五月色| 欧洲精品中文字幕| 26uuuu精品一区二区| 一区二区三区四区国产精品| 久久国产夜色精品鲁鲁99| 99在线精品视频| 日韩欧美国产一区二区三区| 亚洲天堂成人网| 国内精品久久久久影院色| 欧洲亚洲精品在线| 久久精品亚洲精品国产欧美| 亚洲国产成人91porn| 国产激情视频一区二区三区欧美| 色噜噜久久综合| 国产午夜精品久久| 蜜臀av一区二区在线观看| 色香色香欲天天天影视综合网| 欧美精品一区二区在线播放| 亚洲v中文字幕| 99视频有精品| 欧美激情在线一区二区| 免费成人在线播放| 欧美色图在线观看| 综合久久久久久| 粉嫩av一区二区三区| 欧美成人高清电影在线| 亚洲一区二区三区免费视频| 成人ar影院免费观看视频| 国产亚洲一区二区三区在线观看 | 蜜桃在线一区二区三区| 在线观看免费亚洲| 1000精品久久久久久久久| 国产精品中文字幕日韩精品 | 欧美mv日韩mv国产| 五月天激情小说综合| 欧美丝袜丝交足nylons| 亚洲韩国一区二区三区| 色天天综合色天天久久| 综合激情网...| 91亚洲男人天堂| 亚洲欧美偷拍三级| 一本大道av一区二区在线播放| 国产精品久久久久桃色tv| 成人av在线播放网址| 国产精品免费人成网站| eeuss影院一区二区三区| 成人免费在线视频观看| 色天使久久综合网天天| 亚洲成年人网站在线观看| 欧美日韩aaaaa| 麻豆一区二区99久久久久| 2024国产精品视频| 国产精品一区二区不卡| 国产精品国产三级国产aⅴ原创| 99在线热播精品免费| 一区二区三区蜜桃网| 制服丝袜亚洲精品中文字幕| 麻豆国产91在线播放| 久久久久九九视频| 99re这里只有精品6| 午夜欧美大尺度福利影院在线看 | 免费成人美女在线观看.| 日韩视频在线一区二区| 国产精品一区二区在线观看不卡| 国产精品久久久久久久久免费丝袜| 色综合天天综合给合国产| 日韩国产一二三区| 久久久不卡网国产精品二区| 99久久国产综合精品麻豆| 亚洲高清免费观看| 26uuuu精品一区二区| 91猫先生在线| 国内精品免费在线观看| 久久精品国产在热久久| **欧美大码日韩| 日韩亚洲欧美在线观看| 成人av影院在线| 日本中文字幕一区二区有限公司| 久久综合狠狠综合久久综合88| 91丨porny丨首页| 久久av老司机精品网站导航| 日韩毛片视频在线看| 欧美本精品男人aⅴ天堂| 91久久国产最好的精华液| 国产伦精品一区二区三区免费迷 | 亚洲一区二区在线免费观看视频| 亚洲精品在线观| 在线观看亚洲a| 高清久久久久久| 日本不卡在线视频| 亚洲精品日产精品乱码不卡| 精品国产91乱码一区二区三区 | xvideos.蜜桃一区二区| 欧美日韩成人激情| 91亚洲国产成人精品一区二区三| 蜜臀91精品一区二区三区| 亚洲国产日韩综合久久精品| 欧美国产1区2区| 欧美xxx久久| 欧美色涩在线第一页| 成人久久18免费网站麻豆| 久久精品国产精品亚洲红杏| 亚洲国产欧美日韩另类综合 | 91视频一区二区三区| 国产成人三级在线观看| 久久国产麻豆精品| 免费在线一区观看| 亚洲成年人影院| 亚洲sss视频在线视频| 亚洲成人av免费| 国产综合久久久久久久久久久久| 热久久久久久久| 婷婷中文字幕一区三区| 亚洲精品中文字幕乱码三区| 国产精品理伦片| 中文字幕一区二区三区在线不卡| 久久久久久久久97黄色工厂| 国产日韩欧美综合一区| 久久久久久一二三区| 久久免费看少妇高潮| xfplay精品久久| 日本一区二区三区四区在线视频| 337p日本欧洲亚洲大胆精品| 久久久久久综合| 中文字幕+乱码+中文字幕一区| 国产婷婷色一区二区三区四区| 欧美激情一区三区| 国产精品久久二区二区| 亚洲男人天堂av| 亚洲一卡二卡三卡四卡无卡久久 | 美女被吸乳得到大胸91| 国产在线播放一区三区四| 国产成人精品综合在线观看| 成人黄色小视频| 欧美色爱综合网| 欧美一级电影网站| 久久天天做天天爱综合色| 18涩涩午夜精品.www| 亚洲成人综合视频| 久久www免费人成看片高清| 大白屁股一区二区视频| 色哟哟在线观看一区二区三区| 欧美日韩美女一区二区| 欧美大片日本大片免费观看| 国产日韩在线不卡| 亚洲国产日韩a在线播放性色| 久久99国产精品免费| 99久久精品国产观看| 国产日韩欧美精品电影三级在线| 中文字幕一区二区三区色视频 | 欧美视频在线一区| 精品国产乱子伦一区| 自拍偷拍亚洲欧美日韩| 老司机免费视频一区二区 | 在线国产电影不卡| 日韩视频中午一区| 亚洲欧美韩国综合色| 激情伊人五月天久久综合|