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

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

?? xmldigester.java

?? 個人Blog java編寫的Blog可以直接使用!
?? JAVA
字號:
/*
 *  XMLDigester.java
 *  
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *  
 *  Author: Winter Lau (javayou@gmail.com)
 *  http://dlog4j.sourceforge.net
 */
package com.liusoft.dlog4j.xml;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import org.apache.commons.digester.Digester;
import org.apache.commons.digester.rss.Channel;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

/**
 * 通用的解析RDF,RSS,ATOM的類
 * @author Winter Lau
 */
public class XMLDigester extends Digester {

    /**
     * Have we been configured yet?
     */
    protected boolean configured = false;


    /**
     * The set of public identifiers, and corresponding resource names,
     * for the versions of the DTDs that we know about.
     */
    protected static final String registrations[] = {
        "-//Netscape Communications//DTD RSS 0.9//EN",
        "/org/apache/commons/digester/rss/rss-0.9.dtd",
        "-//Netscape Communications//DTD RSS 0.91//EN",
        "/org/apache/commons/digester/rss/rss-0.91.dtd",
    };

    // --------------------------------------------------------- Public Methods


    /**
     * Parse the content of the specified file using this Digester.  Returns
     * the root element from the object stack (which will be the Channel).
     *
     * @param file File containing the XML data to be parsed
     *
     * @exception IOException if an input/output error occurs
     * @exception SAXException if a parsing exception occurs
     */
    public Object parse(File file) throws IOException, SAXException {

        configure();
        return (super.parse(file));

    }


    /**
     * Parse the content of the specified input source using this Digester.
     * Returns the root element from the object stack (which will be the
     * Channel).
     *
     * @param input Input source containing the XML data to be parsed
     *
     * @exception IOException if an input/output error occurs
     * @exception SAXException if a parsing exception occurs
     */
    public Object parse(InputSource input) throws IOException, SAXException {

        configure();
        return (super.parse(input));

    }


    /**
     * Parse the content of the specified input stream using this Digester.
     * Returns the root element from the object stack (which will be
     * the Channel).
     *
     * @param input Input stream containing the XML data to be parsed
     *
     * @exception IOException if an input/output error occurs
     * @exception SAXException if a parsing exception occurs
     */
    public Object parse(InputStream input) throws IOException, SAXException {

        configure();
        return (super.parse(input));

    }


    /**
     * Parse the content of the specified URI using this Digester.
     * Returns the root element from the object stack (which will be
     * the Channel).
     *
     * @param uri URI containing the XML data to be parsed
     *
     * @exception IOException if an input/output error occurs
     * @exception SAXException if a parsing exception occurs
     */
    public Object parse(String uri) throws IOException, SAXException {

        configure();
        return (super.parse(uri));

    }


    // -------------------------------------------------------- Package Methods



    // ------------------------------------------------------ Protected Methods


    /**
     * Configure the parsing rules that will be used to process RSS input.
     */
    protected void configure() {

        if (configured) {
            return;
        }
        
        // Register local copies of the DTDs we understand
        for (int i = 0; i < registrations.length; i += 2) {
            URL url = this.getClass().getResource(registrations[i + 1]);
            if (url != null) {
                register(registrations[i], url.toString());
            }
        }

        setNamespaceAware(true);
        setValidating(false);

        // rdf
		addObjectCreate("RDF", Channel.class);
		addBeanPropertySetter("RDF/channel/title","title");
		addBeanPropertySetter("RDF/channel/link","link");
		addBeanPropertySetter("RDF/channel/description","description");
		addObjectCreate("RDF/item", ChannelItem.class);
		addSetNext("RDF/item","addItem");     
		addBeanPropertySetter("RDF/item/title","title");
		addBeanPropertySetter("RDF/item/link","link");
		addBeanPropertySetter("RDF/item/description","description");
		
		// rss
		addObjectCreate("rss", Channel.class);
		addBeanPropertySetter("rss/channel/title","title");
		addBeanPropertySetter("rss/channel/link","link");
		addBeanPropertySetter("rss/channel/description","description");
		addObjectCreate("rss/channel/item", ChannelItem.class);
		addSetNext("rss/channel/item","addItem");     
		addBeanPropertySetter("rss/channel/item/title","title");
		addBeanPropertySetter("rss/channel/item/link","link");
		addBeanPropertySetter("rss/channel/item/description","description");		
		
        // atom
		addObjectCreate("feed", Channel.class);
		addBeanPropertySetter("feed/title","title");
		addSetProperties("feed/link","href","link");
		addBeanPropertySetter("feed/info","description");
		addObjectCreate("feed/entry", ChannelItem.class);
		addSetNext("feed/entry","addItem");     
		addBeanPropertySetter("feed/entry/title","title");
		addSetProperties("feed/entry/link","href","link");
		addBeanPropertySetter("feed/entry/content","description");
		
        // Mark this digester as having been configured
        configured = true;

    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看视频一区二区| 成人av网站在线观看免费| 成人欧美一区二区三区小说| 欧美精品一区二区蜜臀亚洲| 欧美一级片在线观看| 欧美一区二区视频网站| 7777精品伊人久久久大香线蕉经典版下载 | 18成人在线视频| 国产精品成人一区二区三区夜夜夜| 欧美白人最猛性xxxxx69交| 欧美成人午夜电影| 26uuu亚洲| 国产精品毛片久久久久久 | 91天堂素人约啪| 成人a区在线观看| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 韩国av一区二区三区在线观看| 久久99精品国产麻豆婷婷洗澡| 精品中文字幕一区二区小辣椒| 国产一区不卡在线| 不卡一卡二卡三乱码免费网站| 99这里都是精品| 欧美曰成人黄网| 欧美一区二区三区系列电影| 久久久精品人体av艺术| 一区在线观看免费| 午夜精品久久久久久久99樱桃| 精品在线视频一区| 成人av午夜电影| 欧美精品aⅴ在线视频| 久久久久综合网| 一区二区三区日韩精品视频| 久久草av在线| 一本色道久久综合亚洲aⅴ蜜桃 | 在线亚洲一区观看| 日韩欧美一级二级| 亚洲欧美电影一区二区| 黑人巨大精品欧美一区| 色婷婷综合激情| 国产日韩欧美制服另类| 亚洲国产成人av网| 成人在线综合网| 日韩亚洲欧美一区| 日韩理论在线观看| 久久99久久精品欧美| 91国内精品野花午夜精品| 欧美videos中文字幕| 一二三区精品福利视频| 国产精品影视天天线| 日韩一二三区视频| 亚洲一区电影777| 成人在线视频一区二区| 日韩欧美自拍偷拍| 亚洲欧美偷拍三级| 成人综合婷婷国产精品久久蜜臀| 日韩欧美国产精品| 日本美女视频一区二区| 在线欧美日韩精品| 亚洲欧洲精品天堂一级| 国产电影一区在线| 欧美tickling网站挠脚心| 亚洲午夜久久久久久久久电影网| 国产麻豆午夜三级精品| 日韩欧美的一区| 天堂av在线一区| 欧美亚洲丝袜传媒另类| 中文字幕一区不卡| 不卡的av电影| 中文字幕欧美日韩一区| 狠狠色综合播放一区二区| 欧美私模裸体表演在线观看| 国产欧美一区二区在线观看| 美女视频网站黄色亚洲| 欧美一级久久久| 日本午夜精品视频在线观看| 777午夜精品免费视频| 日韩主播视频在线| 欧美日韩国产首页| 日韩高清不卡一区| 日韩一区二区免费电影| 理论片日本一区| ww亚洲ww在线观看国产| 久久精品国产秦先生| 日韩精品一区国产麻豆| 经典三级视频一区| 国产喷白浆一区二区三区| 久久精品国产亚洲aⅴ| 欧美电视剧在线看免费| 国产精品一区二区在线看| 国产午夜精品一区二区三区嫩草| 成人免费毛片嘿嘿连载视频| 中文字幕综合网| 欧美精品在线视频| 韩国毛片一区二区三区| 中文字幕乱码久久午夜不卡| 91免费看视频| 日本美女一区二区| 中文文精品字幕一区二区| 日本高清无吗v一区| 美女爽到高潮91| 18成人在线观看| 日韩欧美中文字幕公布| 成人福利视频网站| 石原莉奈在线亚洲三区| 中文在线一区二区 | 欧美电视剧在线观看完整版| 国产乱人伦偷精品视频免下载| 国产精品福利一区| 欧美日韩亚洲另类| 国产精品亚洲专一区二区三区| 亚洲图片激情小说| 91精品国产综合久久蜜臀| 国产99久久久久久免费看农村| 一区二区三区日韩欧美| 久久亚洲影视婷婷| 欧美性大战久久久| 国产精选一区二区三区| 亚洲大尺度视频在线观看| 国产亚洲一区二区三区在线观看 | 精品欧美乱码久久久久久| 91丨九色丨尤物| 国产老女人精品毛片久久| 亚洲在线视频网站| 国产精品天美传媒| 日韩精品一区二区三区在线播放| 97se亚洲国产综合在线| 久久国产尿小便嘘嘘尿| 亚洲国产日韩a在线播放性色| 久久伊人中文字幕| 91精品国产免费久久综合| jlzzjlzz欧美大全| 国产精品一二三四五| 蜜桃av一区二区三区| 亚洲成人av一区| 亚洲色图在线播放| 国产精品日日摸夜夜摸av| 亚洲精品在线免费观看视频| 欧美另类一区二区三区| 在线视频国产一区| 一本色道久久综合狠狠躁的推荐| 国产成人8x视频一区二区| 精品亚洲国内自在自线福利| 日韩高清不卡一区二区| 日日夜夜免费精品| 五月婷婷色综合| 午夜伊人狠狠久久| 亚洲国产精品影院| 亚洲高清一区二区三区| 一区二区国产视频| 亚洲一区在线播放| 亚洲国产中文字幕在线视频综合| 亚洲欧美国产三级| 亚洲一区精品在线| 亚洲大型综合色站| 日韩中文字幕亚洲一区二区va在线| 亚洲第一福利一区| 蜜桃91丨九色丨蝌蚪91桃色| 免费看日韩精品| 久久精品国产一区二区| 国产一区二三区| 国产成人av电影在线| 成人激情免费网站| 在线观看区一区二| 欧美日韩一区久久| 日韩女优av电影在线观看| 精品国产91乱码一区二区三区 | 91色porny| 精品视频全国免费看| 日韩视频在线你懂得| 精品国产伦一区二区三区免费| 精品乱人伦小说| 中文天堂在线一区| 亚洲在线视频一区| 麻豆91精品91久久久的内涵| 国产一区91精品张津瑜| av电影一区二区| 欧美性受xxxx| 久久久亚洲国产美女国产盗摄 | 有坂深雪av一区二区精品| 婷婷夜色潮精品综合在线| 美日韩一区二区| 99久久久国产精品免费蜜臀| 欧美日韩国产小视频在线观看| wwwwxxxxx欧美| 亚洲一区二区三区自拍| 精品亚洲porn| 91精彩视频在线观看| 欧美成人三级在线| 一区二区三区毛片| 激情欧美一区二区三区在线观看| 国产mv日韩mv欧美| 欧美一级免费观看| 中文字幕欧美一区| 美国欧美日韩国产在线播放| 成人app软件下载大全免费| 欧美一区二区视频网站| 亚洲乱码中文字幕| 国产一本一道久久香蕉| 精品视频资源站| 亚洲三级电影网站|