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

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

?? kittest.java

?? 本程序用于對頁面信息進行提取并分析
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
            node = (Node)mNodes.elementAt (i);            if (node instanceof Tag)            {                ours = ((Attribute)(((Tag)node).getAttributesEx ().elementAt (0))).getName ().substring (1);                if (match (theirs, ours))                {                    match = i;                    break;                }            }        }        if (-1 == match)        {            node = (Node)mNodes.elementAt (mIndex);            ours = node.getText ();            System.out.println ("theirs: " + theirs);            Cursor cursor = new Cursor (((AbstractNode)node).getPage (), node.getStartPosition ());            System.out.println ("ours " + cursor + ": " + ours);        }        else        {            boolean skipped = false;            for (int i = mIndex; i < match; i++)            {                ours = ((Node)mNodes.elementAt (i)).toHtml ();                if (0 != ours.trim ().length ())                {                    if (!skipped)                        System.out.println ("skipping:");                    System.out.println (ours);                    skipped = true;                }            }            if (skipped)            {                System.out.println ("to match:");                node = (Node)mNodes.elementAt (match);                Cursor cursor = new Cursor (((AbstractNode)node).getPage (), node.getStartPosition ());                System.out.println ("@" + cursor + ": " + node.toHtml ());            }//            System.out.println (" match: " + theirs);            mIndex = match + 1;        }    }    /**     * Callback for a non-composite tag.     * @param t The tag extracted from the page.     * @param a The attributes parsed out of the tag.     * @param pos The position in the page.     * <em>Note: This differs from the Lexer concept of position which is an     * absolute location in the HTML input stream. This position is the character     * position if the text from the page were displayed in a browser.</em>     */    public void handleSimpleTag (HTML.Tag t, MutableAttributeSet a, int pos)    {        String theirs;        Node node;        int match;        String ours;        theirs = t.toString ();        match = -1;        for (int i = mIndex; i < Math.min (mIndex + 25, mNodes.size ()); i++)        {            node = (Node)mNodes.elementAt (i);            if (node instanceof Tag)            {                ours = ((Attribute)(((Tag)node).getAttributesEx ().elementAt (0))).getName ();                if (match (theirs, ours))                {                    match = i;                    break;                }                if (match (theirs, ours))                {                    match = i;                    break;                }            }        }        if (-1 == match)        {            node = (Node)mNodes.elementAt (mIndex);            ours = node.getText ();            System.out.println ("theirs: " + theirs);            Cursor cursor = new Cursor (((AbstractNode)node).getPage (), node.getStartPosition ());            System.out.println ("ours " + cursor + ": " + ours);        }        else        {            boolean skipped = false;            for (int i = mIndex; i < match; i++)            {                ours = ((Node)mNodes.elementAt (i)).toHtml ();                if (0 != ours.trim ().length ())                {                    if (!skipped)                        System.out.println ("skipping:");                    System.out.println (ours);                    skipped = true;                }            }            if (skipped)            {                System.out.println ("to match:");                node = (Node)mNodes.elementAt (match);                Cursor cursor = new Cursor (((AbstractNode)node).getPage (), node.getStartPosition ());                System.out.println ("@" + cursor + ": " + node.toHtml ());            }//            System.out.println (" match: " + theirs);            mIndex = match + 1;        }    }    /**     * Callback for an error condition.     * @param errorMsg The error condition as a text message.     * @param pos The position in the page.     * <em>Note: This differs from the Lexer concept of position which is an     * absolute location in the HTML input stream. This position is the character     * position if the text from the page were displayed in a browser.</em>     */    public void handleError (String errorMsg, int pos)    {        System.out.println ("******* error @" + pos + " ******** " + errorMsg);    }    /**     * Callback for flushing the state, just prior to shutting down the parser.     */    public void flush () throws BadLocationException    {    }    /**     * This is invoked after the stream has been parsed, but before     * <code>flush</code>. <code>eol</code> will be one of \n, \r     * or \r\n, which ever is encountered the most in parsing the     * stream.     *     * @since 1.3     */    public void handleEndOfLineString (String eol)    {    }//    /**//     * Get the document data from the URL.//     * @param rd The reader to read bytes from.//     * @return The parsed HTML document.//     *///    protected static Element[] getData (Reader rd) throws IOException//    {//        EditorKit kit;//        Document doc;//        Element[] ret;////        ret = null;////        // need this because HTMLEditorKit is not thread safe apparently//        synchronized (Boolean.TRUE)//        {//            kit = new HTMLEditorKit ();//            doc = kit.createDefaultDocument ();//            // the Document class does not yet handle charset's properly//            doc.putProperty ("IgnoreCharsetDirective", Boolean.TRUE);////            try//            {//                // parse the HTML//                kit.read (rd, doc, 0);//            }//            catch (BadLocationException ble)//            {//                throw new IOException ("parse error " + ble.getMessage ());//            }////            ret = doc.getRootElements ();//        }////        return (ret);//    }//    public static void scanElements (Element element) throws BadLocationException//    {//        int start;//        int end;//        String string;//        ElementIterator it;//        Element child;////        if (element.isLeaf ())//        {//            start = element.getStartOffset ();//            end = element.getEndOffset ();//            string = element.getDocument ().getText (start, end - start);//            System.out.println (string);//        }//        else//            // iterate through the elements of the element//            for (int i = 0; i < element.getElementCount (); i++)//            {//                child = element.getElement (i);//                scanElements (child);//            }//    }    /**     * Subclass of HTMLEditorKit to expose getParser().     */    class MyKit extends HTMLEditorKit    {        public MyKit ()        {        }        public HTMLEditorKit.Parser getParser ()        {            return (super.getParser ());        }    }    /**     * Return a editor kit.     */    public MyKit getKit ()    {        return (new MyKit ());    }    /**     * Manline for the test.     * @param args the command line arguments.     * If present the first array element is used as a URL to parse.     */    public static void main (String[] args) throws ParserException, IOException    {        String link;        Lexer lexer;        Node node;        Vector nodes;        KitTest test;        MyKit kit;        Parser parser;        if (0 == args.length)            link = "http://sourceforge.net/projects/htmlparser";        else            link = args[0];        // pass through it once to read the entire page        URL url = new URL (link);        lexer = new Lexer (url.openConnection ());        nodes = new Vector ();        while (null != (node = lexer.nextNode ()))            nodes.addElement (node);        // reset the reader        lexer.getPage ().getSource ().reset ();        test = new KitTest (nodes);        kit = test.getKit ();        parser = kit.getParser ();        parser.parse (lexer.getPage ().getSource (), test, true);    }}/* * Revision Control Modification History * * $Log: KitTest.java,v $ * Revision 1.10  2005/05/15 11:49:05  derrickoswald * Documentation revamp part four. * Remove some checkstyle warnings. * * Revision 1.9  2005/04/10 23:20:46  derrickoswald * Documentation revamp part one. * Deprecated node decorators. * Added doSemanticAction for Text and Comment nodes. * Added missing sitecapturer scripts. * Fixed DOS batch files to work when called from any location. * * Revision 1.8  2004/07/31 16:42:31  derrickoswald * Remove unused variables and other fixes exposed by turning on compiler warnings. * * Revision 1.7  2004/05/24 16:18:31  derrickoswald * Part three of a multiphase refactoring. * The three node types are now fronted by interfaces (program to the interface paradigm) * with concrete implementations in the new htmlparser.nodes package. Classes from the * lexer.nodes package are moved to this package, and obvious references to the concrete * classes that got broken by this have been changed to use the interfaces where possible. * * Revision 1.6  2004/01/14 02:53:47  derrickoswald * *** empty log message *** * * Revision 1.5  2003/10/20 01:28:03  derrickoswald * Removed lexer level AbstractNode. * Removed data package from parser level tags. * Separated tag creation from recursion in NodeFactory interface. * * Revision 1.4  2003/09/10 03:38:24  derrickoswald * Add style checking target to ant build script: *     ant checkstyle * It uses a jar from http://checkstyle.sourceforge.net which is dropped in the lib directory. * The rules are in the file htmlparser_checks.xml in the src directory. * * Added lexerapplications package with Tabby as the first app. It performs whitespace manipulation * on source files to follow the style rules. This reduced the number of style violations to roughly 14,000. * * There are a few issues with the style checker that need to be resolved before it should be taken too seriously. * For example: * It thinks all method arguments should be final, even if they are modified by the code (which the compiler frowns on). * It complains about long lines, even when there is no possibility of wrapping the line, i.e. a URL in a comment * that's more than 80 characters long. * It considers all naked integers as 'magic numbers', even when they are obvious, i.e. the 4 corners of a box. * It complains about whitespace following braces, even in array initializers, i.e. X[][] = { {a, b} { } } * * But it points out some really interesting things, even if you don't agree with the style guidelines, * so it's worth a look. * * Revision 1.3  2003/08/27 02:40:24  derrickoswald * Testing cvs keyword substitution. * * */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产美女视频91| 国产清纯白嫩初高生在线观看91 | 国产成人精品免费看| 精品国产人成亚洲区| 久久99国内精品| 国产色综合一区| 91色九色蝌蚪| 亚洲高清免费在线| 欧美一级高清大全免费观看| 久久成人免费网| 中文字幕精品三区| 日本韩国视频一区二区| 水野朝阳av一区二区三区| 欧美一卡二卡三卡| 国产电影一区二区三区| 亚洲日本va午夜在线影院| 欧美色网一区二区| 麻豆久久一区二区| 日本一区二区高清| 欧美视频在线播放| 国产精品一卡二卡在线观看| 国产精品久久久久久久久果冻传媒 | 亚洲1区2区3区4区| 精品日韩一区二区三区免费视频| 国产精品综合一区二区| 亚洲精品国产品国语在线app| 欧美电影在线免费观看| 国产成人在线视频网址| 亚洲午夜久久久久久久久电影网| 欧美一区二区三区在线| 波多野结衣中文字幕一区| 性久久久久久久| 亚洲欧洲av另类| 欧美视频你懂的| 福利一区福利二区| 石原莉奈一区二区三区在线观看 | av欧美精品.com| 亚洲成人在线免费| 亚洲国产精品成人综合| 在线观看91精品国产麻豆| 国产伦精一区二区三区| 亚洲6080在线| 亚洲欧美日韩国产中文在线| 久久久久9999亚洲精品| 欧美裸体bbwbbwbbw| 99久久精品情趣| 久久成人免费日本黄色| 亚洲成人在线网站| 亚洲欧美日韩国产综合在线| 久久精品日韩一区二区三区| 欧美一区二区性放荡片| 欧美亚洲自拍偷拍| 99久久国产综合色|国产精品| 精品一区二区三区在线观看| 亚洲18女电影在线观看| 亚洲精品国产无天堂网2021| 中文av一区二区| 国产日韩精品一区二区三区在线| 欧美理论在线播放| 91福利在线免费观看| 成人av影视在线观看| 国产一区亚洲一区| 麻豆国产精品777777在线| 五月天欧美精品| 亚洲色欲色欲www| 中文字幕精品—区二区四季| 欧美精品一区二区高清在线观看| 欧美久久久久免费| 欧美日韩高清一区二区| 在线视频中文字幕一区二区| 91色乱码一区二区三区| 色综合久久精品| 色综合天天性综合| 色综合久久99| 欧美性猛片xxxx免费看久爱| 91玉足脚交白嫩脚丫在线播放| 国产成人精品影院| 成人黄色av网站在线| 91免费看`日韩一区二区| av在线不卡网| 色综合久久久久久久久久久| 色综合天天天天做夜夜夜夜做| 91视频在线看| 色吊一区二区三区 | 欧美日韩高清影院| 欧美美女直播网站| 欧美精品自拍偷拍动漫精品| 91精品婷婷国产综合久久竹菊| 91麻豆精品国产91久久久久久 | 色综合天天综合网国产成人综合天| 99精品欧美一区二区三区综合在线| 国产iv一区二区三区| 成人激情黄色小说| 色婷婷综合久久久久中文| 91福利国产成人精品照片| 欧美日韩日日骚| 欧美不卡在线视频| 国产精品美女久久福利网站| 亚洲激情第一区| 亚洲高清视频的网址| 久久国产尿小便嘘嘘| 国产精品996| 91污片在线观看| 欧美日韩aaaaaa| 欧美成人video| 中文字幕亚洲一区二区av在线| 一级女性全黄久久生活片免费| 日韩高清不卡一区二区三区| 夫妻av一区二区| 欧美日韩一级大片网址| 欧美精品一区二区三区视频| 亚洲欧洲精品一区二区三区不卡| 亚洲自拍偷拍综合| 国内精品免费**视频| 91美女福利视频| 欧美成人综合网站| |精品福利一区二区三区| 日本欧美一区二区| 北岛玲一区二区三区四区| 7799精品视频| 国产精品国产三级国产普通话99 | 欧美人狂配大交3d怪物一区| 国产精品国产三级国产专播品爱网| 亚洲亚洲精品在线观看| 国产精品资源网站| 欧美日韩一级二级三级| 国产精品美女久久久久久久久| 日韩在线一区二区| www.亚洲激情.com| 欧美tickle裸体挠脚心vk| 一区二区三区在线免费观看| 国产毛片一区二区| 欧美一区永久视频免费观看| 亚洲少妇30p| 国产成人高清视频| 日韩写真欧美这视频| 亚洲一区视频在线| www.一区二区| 国产日韩欧美a| 激情五月婷婷综合| 欧美日韩精品三区| 一区二区在线电影| 成人精品国产一区二区4080| 日韩欧美一区二区久久婷婷| 亚洲国产一区二区三区 | 亚洲成av人片一区二区梦乃| 97久久精品人人澡人人爽| 久久综合久久99| 麻豆精品一区二区| 欧美精品日韩一区| 亚洲gay无套男同| 91精彩视频在线| 亚洲视频在线一区| 一本久久a久久精品亚洲| 国产精品久久久久影院| 国产白丝精品91爽爽久久| 精品国产乱码久久久久久牛牛 | 亚洲激情自拍视频| 99热精品国产| 亚洲欧美另类小说| 91美女片黄在线| 亚洲人成网站在线| 91色视频在线| 一区二区在线电影| 欧美日韩在线三级| 亚洲成av人片一区二区| 色爱区综合激月婷婷| 亚洲一级二级三级| 欧美在线一二三四区| 亚洲国产成人av网| 欧美日韩精品欧美日韩精品一 | 国产视频911| 丁香婷婷综合网| 国产精品久久网站| 99精品国产99久久久久久白柏| 国产精品你懂的| 99vv1com这只有精品| 亚洲美女区一区| 欧美日韩国产一级二级| 偷窥国产亚洲免费视频| 在线不卡免费欧美| 精品无人码麻豆乱码1区2区| 精品捆绑美女sm三区| 狠狠色综合日日| 中文成人综合网| 在线中文字幕一区二区| 亚洲图片欧美一区| 精品99一区二区| 99精品热视频| 日韩成人免费在线| 欧美激情一区二区三区不卡| av动漫一区二区| 午夜婷婷国产麻豆精品| 欧美成人免费网站| 成人小视频在线| 亚洲午夜电影网| 精品99一区二区| 在线视频一区二区三区| 激情综合网av| 亚洲精品视频在线看|