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

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

?? dombuilder.java

?? openlogic-jdom-1.1-all-src-1.zip 可以用于操作xml文件
?? JAVA
字號:
/*-- $Id: DOMBuilder.java,v 1.60 2007/11/10 05:29:00 jhunter Exp $ Copyright (C) 2000-2007 Jason Hunter & Brett McLaughlin. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright    notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright    notice, this list of conditions, and the disclaimer that follows    these conditions in the documentation and/or other materials    provided with the distribution. 3. The name "JDOM" must not be used to endorse or promote products    derived from this software without prior written permission.  For    written permission, please contact <request_AT_jdom_DOT_org>. 4. Products derived from this software may not be called "JDOM", nor    may "JDOM" appear in their name, without prior written permission    from the JDOM Project Management <request_AT_jdom_DOT_org>. In addition, we request (but do not require) that you include in the end-user documentation provided with the redistribution and/or in the software itself an acknowledgement equivalent to the following:     "This product includes software developed by the      JDOM Project (http://www.jdom.org/)." Alternatively, the acknowledgment may be graphical using the logos available at http://www.jdom.org/images/logos. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the JDOM Project and was originally created by Jason Hunter <jhunter_AT_jdom_DOT_org> and Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information on the JDOM Project, please see <http://www.jdom.org/>. */package org.jdom.input;import org.jdom.*;import org.jdom.Document;import org.jdom.Element;import org.w3c.dom.*;/** * Builds a JDOM {@link org.jdom.Document org.jdom.Document} from a pre-existing * DOM {@link org.w3c.dom.Document org.w3c.dom.Document}. Also handy for testing * builds from files to sanity check {@link SAXBuilder}. * * @version $Revision: 1.60 $, $Date: 2007/11/10 05:29:00 $ * @author  Brett McLaughlin * @author  Jason Hunter * @author  Philip Nelson * @author  Kevin Regan * @author  Yusuf Goolamabbas * @author  Dan Schaffer * @author  Bradley S. Huffman */public class DOMBuilder {    private static final String CVS_ID =      "@(#) $RCSfile: DOMBuilder.java,v $ $Revision: 1.60 $ $Date: 2007/11/10 05:29:00 $ $Name: jdom_1_1 $";    /** Adapter class to use */    private String adapterClass;    /** The factory for creating new JDOM objects */    private JDOMFactory factory = new DefaultJDOMFactory();    /**     * This creates a new DOMBuilder which will attempt to first locate     * a parser via JAXP, then will try to use a set of default parsers.     * The underlying parser will not validate.     */    public DOMBuilder() {    }    /**     * This creates a new DOMBuilder using the specified DOMAdapter     * implementation as a way to choose the underlying parser.     * The underlying parser will not validate.     *     * @param adapterClass <code>String</code> name of class     *                     to use for DOM building.     */    public DOMBuilder(String adapterClass) {        this.adapterClass = adapterClass;    }    /*     * This sets a custom JDOMFactory for the builder.  Use this to build     * the tree with your own subclasses of the JDOM classes.     *     * @param factory <code>JDOMFactory</code> to use     */    public void setFactory(JDOMFactory factory) {        this.factory = factory;    }    /**     * Returns the current {@link org.jdom.JDOMFactory} in use.     * @return the factory in use     */    public JDOMFactory getFactory() {        return factory;    }    /**     * This will build a JDOM tree from an existing DOM tree.     *     * @param domDocument <code>org.w3c.dom.Document</code> object     * @return <code>Document</code> - JDOM document object.     */    public Document build(org.w3c.dom.Document domDocument) {        Document doc = factory.document(null);        buildTree(domDocument, doc, null, true);        return doc;    }    /**     * This will build a JDOM Element from an existing DOM Element     *     * @param domElement <code> org.w3c.dom.Element</code> object     * @return <code>Element</code> - JDOM Element object     */    public org.jdom.Element build(org.w3c.dom.Element domElement) {        Document doc = factory.document(null);        buildTree(domElement, doc, null, true);        return doc.getRootElement();    }    /**     * This takes a DOM <code>Node</code> and builds up     * a JDOM tree, recursing until the DOM tree is exhausted     * and the JDOM tree results.     *     * @param node <code>Code</node> to examine.     * @param doc JDOM <code>Document</code> being built.     * @param current <code>Element</code> that is current parent.     * @param atRoot <code>boolean</code> indicating whether at root level.     */    private void buildTree(Node node,                           Document doc,                           Element current,                           boolean atRoot) {        // Recurse through the tree        switch (node.getNodeType()) {            case Node.DOCUMENT_NODE:                NodeList nodes = node.getChildNodes();                for (int i=0, size=nodes.getLength(); i<size; i++) {                    buildTree(nodes.item(i), doc, current, true);                }                break;            case Node.ELEMENT_NODE:                String nodeName = node.getNodeName();                String prefix = "";                String localName = nodeName;                int colon = nodeName.indexOf(':');                if (colon >= 0) {                    prefix = nodeName.substring(0, colon);                    localName = nodeName.substring(colon + 1);                }                // Get element's namespace                Namespace ns = null;                String uri = node.getNamespaceURI();                if (uri == null) {                    ns = (current == null) ? Namespace.NO_NAMESPACE                                           : current.getNamespace(prefix);                }                else {                    ns = Namespace.getNamespace(prefix, uri);                }                Element element = factory.element(localName, ns);                if (atRoot) {                    // If at root, set as document root                    doc.setRootElement(element);  // XXX should we use a factory call?                } else {                    // else add to parent element                    factory.addContent(current, element);                }                // Add namespaces                NamedNodeMap attributeList = node.getAttributes();                int attsize = attributeList.getLength();                for (int i = 0; i < attsize; i++) {                    Attr att = (Attr) attributeList.item(i);                    String attname = att.getName();                    if (attname.startsWith("xmlns")) {                        String attPrefix = "";                        colon = attname.indexOf(':');                        if (colon >= 0) {                            attPrefix = attname.substring(colon + 1);                        }                        String attvalue = att.getValue();                        Namespace declaredNS =                            Namespace.getNamespace(attPrefix, attvalue);                        // Add as additional namespaces if it's different                        // than this element's namespace (perhaps we should                        // also have logic not to mark them as additional if                        // it's been done already, but it probably doesn't                        // matter)                        if (prefix.equals(attPrefix)) {                            element.setNamespace(declaredNS);                        }                        else {                            factory.addNamespaceDeclaration(element, declaredNS);                        }                    }                }                // Add attributes                for (int i = 0; i < attsize; i++) {                    Attr att = (Attr) attributeList.item(i);                    String attname = att.getName();                    if ( !attname.startsWith("xmlns")) {                        String attPrefix = "";                        String attLocalName = attname;                        colon = attname.indexOf(':');                        if (colon >= 0) {                            attPrefix = attname.substring(0, colon);                            attLocalName = attname.substring(colon + 1);                        }                        String attvalue = att.getValue();                        // Get attribute's namespace                        Namespace attns = null;                        if ("".equals(attPrefix)) {                            attns = Namespace.NO_NAMESPACE;                        }                        else {                            attns = element.getNamespace(attPrefix);                        }                        Attribute attribute =                            factory.attribute(attLocalName, attvalue, attns);                        factory.setAttribute(element, attribute);                    }                }                // Recurse on child nodes                // The list should never be null nor should it ever contain                // null nodes, but some DOM impls are broken                NodeList children = node.getChildNodes();                if (children != null) {                    int size = children.getLength();                    for (int i = 0; i < size; i++) {                        Node item = children.item(i);                        if (item != null) {                            buildTree(item, doc, element, false);                        }                    }                }                break;            case Node.TEXT_NODE:                String data = node.getNodeValue();                factory.addContent(current, factory.text(data));                break;            case Node.CDATA_SECTION_NODE:                String cdata = node.getNodeValue();                factory.addContent(current, factory.cdata(cdata));                break;            case Node.PROCESSING_INSTRUCTION_NODE:                if (atRoot) {                    factory.addContent(doc,                        factory.processingInstruction(node.getNodeName(),                                                      node.getNodeValue()));                } else {                    factory.addContent(current,                        factory.processingInstruction(node.getNodeName(),                                                      node.getNodeValue()));                }                break;            case Node.COMMENT_NODE:                if (atRoot) {                    factory.addContent(doc, factory.comment(node.getNodeValue()));                } else {                    factory.addContent(current, factory.comment(node.getNodeValue()));                }                break;            case Node.ENTITY_REFERENCE_NODE:                EntityRef entity = factory.entityRef(node.getNodeName());                factory.addContent(current, entity);                break;            case Node.ENTITY_NODE:                // ??                break;            case Node.DOCUMENT_TYPE_NODE:                DocumentType domDocType = (DocumentType)node;                String publicID = domDocType.getPublicId();                String systemID = domDocType.getSystemId();                String internalDTD = domDocType.getInternalSubset();                DocType docType = factory.docType(domDocType.getName());                docType.setPublicID(publicID);                docType.setSystemID(systemID);                docType.setInternalSubset(internalDTD);                factory.addContent(doc, docType);                break;        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合九色欧美综合狠狠 | 成人激情小说网站| 99热在这里有精品免费| 欧美日韩精品欧美日韩精品| 久久综合久久久久88| 亚洲一区成人在线| 成人综合在线观看| 欧美不卡一区二区| 亚洲电影中文字幕在线观看| 粉嫩久久99精品久久久久久夜| 欧美猛男超大videosgay| 国产精品福利一区二区三区| 久久国内精品自在自线400部| 99精品国产热久久91蜜凸| 精品sm捆绑视频| 五月婷婷色综合| 日本精品一级二级| 中文字幕中文字幕在线一区| 激情综合五月婷婷| 日韩女优视频免费观看| 亚洲gay无套男同| 在线观看国产91| 最新日韩av在线| 欧美少妇性性性| 国产精品久久久久一区 | 五月天久久比比资源色| 成人福利在线看| 中文字幕一区二区三区蜜月| 欧美日韩三级一区| 国产精品欧美精品| 美女诱惑一区二区| 日韩一区二区中文字幕| 免费成人在线观看| 欧美一区二区福利视频| 日韩和欧美的一区| 91精品久久久久久久91蜜桃| 天天色天天爱天天射综合| 欧洲一区二区三区在线| 亚洲影视在线观看| 欧美日韩免费观看一区三区| 亚洲国产另类精品专区| 欧美日本视频在线| 久久精品免费观看| 国产日韩欧美a| 97精品电影院| 亚洲综合免费观看高清完整版| 欧美在线|欧美| 日韩电影免费在线| 欧美精品一区二区久久婷婷| 国产一区二区三区免费播放 | 麻豆一区二区在线| 久久久美女毛片| 99这里只有久久精品视频| 最新欧美精品一区二区三区| 欧美色视频在线| 美国一区二区三区在线播放| 国产女主播在线一区二区| 99视频超级精品| 三级欧美在线一区| 久久久99精品久久| 在线一区二区三区做爰视频网站| 视频在线观看一区| 亚洲国产成人午夜在线一区| 91亚洲国产成人精品一区二区三| 婷婷丁香激情综合| 国产欧美日韩在线| 欧美三区在线观看| 国产成人8x视频一区二区| 一区二区欧美国产| 国产主播一区二区三区| 亚洲国产精品高清| 91精品国产色综合久久不卡电影 | 日韩不卡一区二区| 国产日韩精品一区二区三区| 欧美亚洲一区二区在线| 国产乱子轮精品视频| 一级女性全黄久久生活片免费| 欧美一区二区久久久| 一本高清dvd不卡在线观看| 经典一区二区三区| 一区二区免费看| 欧美国产一区二区| 日韩女优毛片在线| 色94色欧美sute亚洲13| 国产麻豆一精品一av一免费| 亚洲风情在线资源站| 国产精品成人在线观看| 2021国产精品久久精品| 欧美影院一区二区| 成人久久视频在线观看| 免费国产亚洲视频| 亚洲国产中文字幕在线视频综合| 国产人成一区二区三区影院| 日韩欧美黄色影院| 欧美色综合天天久久综合精品| 成+人+亚洲+综合天堂| 国产一区二区精品在线观看| 天天亚洲美女在线视频| 亚洲国产aⅴ天堂久久| 1区2区3区精品视频| 久久久美女艺术照精彩视频福利播放| 678五月天丁香亚洲综合网| 91福利视频久久久久| jlzzjlzz亚洲日本少妇| 大白屁股一区二区视频| 国产精品99久久久久久宅男| 美腿丝袜亚洲一区| 免费人成在线不卡| 视频在线观看一区二区三区| 午夜久久福利影院| 午夜欧美大尺度福利影院在线看| 一区二区三区在线免费| 一区二区在线看| 亚洲精品免费播放| 亚洲精品欧美综合四区| 一区二区三区在线免费视频| 一区二区三区成人在线视频| 亚洲黄网站在线观看| 夜夜揉揉日日人人青青一国产精品 | 国产精品热久久久久夜色精品三区| 精品日韩一区二区| 欧美精品一区二区三区四区| 精品国内片67194| 久久久久久久综合| 中文字幕一区日韩精品欧美| 中文字幕一区二区三区蜜月 | 国产日韩欧美亚洲| 国产精品网站在线| 亚洲蜜桃精久久久久久久| 亚洲激情一二三区| 亚洲1区2区3区4区| 麻豆精品久久精品色综合| 久久精品国产一区二区三 | 久久久久久综合| 亚洲国产成人自拍| 亚洲国产综合在线| 久久99国内精品| 成人短视频下载| 欧美伊人精品成人久久综合97 | 精品在线观看免费| 国产精品1区二区.| 色综合婷婷久久| 777奇米成人网| 国产欧美精品国产国产专区| 亚洲一区二区四区蜜桃| 青青青爽久久午夜综合久久午夜| 国产综合色精品一区二区三区| 成a人片国产精品| 7777精品伊人久久久大香线蕉的| 久久精品在这里| 亚洲国产一区二区三区青草影视| 精品一区二区三区久久| 97精品超碰一区二区三区| 777欧美精品| 中文字幕中文字幕中文字幕亚洲无线| 亚洲 欧美综合在线网络| 黄色资源网久久资源365| 91丨porny丨首页| 日韩精品一区在线观看| 亚洲精品中文字幕乱码三区| 美女高潮久久久| 91福利在线导航| 欧美经典一区二区| 蜜臀av一区二区| 91久久精品一区二区三| 精品国产第一区二区三区观看体验| 日韩毛片高清在线播放| 狠狠色狠狠色综合系列| 欧美在线免费视屏| 国产人伦精品一区二区| 麻豆精品一区二区综合av| 在线中文字幕一区| 久久精品视频在线看| 日韩精品国产欧美| 91久久精品一区二区| 中国av一区二区三区| 久久不见久久见免费视频1| 欧美在线观看禁18| 国产精品久久久久aaaa樱花 | 免费成人小视频| 欧美亚洲自拍偷拍| 亚洲欧美日韩在线播放| 国产成人免费高清| 精品久久久久久最新网址| 天天综合天天综合色| 91黄色免费网站| 国产精品国产三级国产普通话蜜臀 | 91在线免费播放| 国产婷婷一区二区| 精品影院一区二区久久久| 欧美一区二区人人喊爽| 日产精品久久久久久久性色| 91久久精品一区二区| 亚洲欧美日韩在线不卡| 91美女视频网站| 亚洲视频 欧洲视频| 成av人片一区二区| 中文字幕综合网| 一本一本大道香蕉久在线精品| 亚洲欧洲av另类|