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

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

?? domutils.java

?? Xfire文件 用于開發web service 的一個開源工具 很好用的
?? JAVA
字號:
/* * Copyright 1999,2004 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.codehaus.xfire.util;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import java.io.StringReader;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import javax.xml.parsers.ParserConfigurationException;import javax.xml.transform.OutputKeys;import javax.xml.transform.Transformer;import javax.xml.transform.TransformerException;import javax.xml.transform.TransformerFactory;import javax.xml.transform.dom.DOMSource;import javax.xml.transform.stream.StreamResult;import org.codehaus.xfire.XFireRuntimeException;import org.w3c.dom.Document;import org.w3c.dom.NamedNodeMap;import org.w3c.dom.Node;import org.xml.sax.EntityResolver;import org.xml.sax.InputSource;import org.xml.sax.SAXException;/** * Few simple utils to read DOM. This is originally from the Jakarta Commons * Modeler. *  * @author Costin Manolache */public class DOMUtils{        /**     * Get the raw text content of a node or null if there is no text     */    public static String getRawContent(Node n)    {        if (n == null)            return null;        Node n1 = DOMUtils.getChild(n, Node.TEXT_NODE);        if (n1 == null)            return null;        String s1 = n1.getNodeValue();        return s1.trim();    }        /**     * Get the trimed text content of a node or null if there is no text     */    public static String getContent(Node n)    {        if (n == null)            return null;        Node n1 = DOMUtils.getChild(n, Node.TEXT_NODE);        if (n1 == null)            return null;        String s1 = n1.getNodeValue();        return s1.trim();    }    /**     * Get the first element child.     *      * @param parent     *            lookup direct childs     * @param name     *            name of the element. If null return the first element.     */    public static Node getChild(Node parent, String name)    {        if (parent == null)            return null;        Node first = parent.getFirstChild();        if (first == null)            return null;        for (Node node = first; node != null; node = node.getNextSibling())        {                       if (node.getNodeType() != Node.ELEMENT_NODE)                continue;            if (name != null && name.equals(node.getNodeName()))            {                return node;            }            if (name == null)            {                return node;            }        }        return null;    }    public static String getAttribute(Node element, String attName)    {        NamedNodeMap attrs = element.getAttributes();        if (attrs == null)            return null;        Node attN = attrs.getNamedItem(attName);        if (attN == null)            return null;        return attN.getNodeValue();    }    public static void setAttribute(Node node, String attName, String val)    {        NamedNodeMap attributes = node.getAttributes();        Node attNode = node.getOwnerDocument().createAttribute(attName);        attNode.setNodeValue(val);        attributes.setNamedItem(attNode);    }    public static void removeAttribute(Node node, String attName)    {        NamedNodeMap attributes = node.getAttributes();        attributes.removeNamedItem(attName);    }    /**     * Set or replace the text value     */    public static void setText(Node node, String val)    {        Node chld = DOMUtils.getChild(node, Node.TEXT_NODE);        if (chld == null)        {            Node textN = node.getOwnerDocument().createTextNode(val);            node.appendChild(textN);            return;        }        // change the value        chld.setNodeValue(val);    }    /**     * Find the first direct child with a given attribute.     *      * @param parent     * @param elemName     *            name of the element, or null for any     * @param attName     *            attribute we're looking for     * @param attVal     *            attribute value or null if we just want any     */    public static Node findChildWithAtt(Node parent, String elemName,            String attName, String attVal)    {        Node child = DOMUtils.getChild(parent, Node.ELEMENT_NODE);        if (attVal == null)        {            while (child != null                    && (elemName == null || elemName                            .equals(child.getNodeName()))                    && DOMUtils.getAttribute(child, attName) != null)            {                child = getNext(child, elemName, Node.ELEMENT_NODE);            }        }        else        {            while (child != null                    && (elemName == null || elemName                            .equals(child.getNodeName()))                    && !attVal.equals(DOMUtils.getAttribute(child, attName)))            {                child = getNext(child, elemName, Node.ELEMENT_NODE);            }        }        return child;    }    /**     * Get the first child's content ( ie it's included TEXT node ).     */    public static String getChildContent(Node parent, String name)    {        Node first = parent.getFirstChild();        if (first == null)            return null;        for (Node node = first; node != null; node = node.getNextSibling())        {            if (name.equals(node.getNodeName()))            {                return getContent(node);            }        }        return null;    }    /**     * Get the first direct child with a given type     */    public static Node getChild(Node parent, int type)    {        Node n = parent.getFirstChild();        while (n != null && type != n.getNodeType())        {            n = n.getNextSibling();        }        if (n == null)            return null;        return n;    }    /**     * Get the next sibling with the same name and type     */    public static Node getNext(Node current)    {        String name = current.getNodeName();        int type = current.getNodeType();        return getNext(current, name, type);    }    /**     * Return the next sibling with a given name and type     */    public static Node getNext(Node current, String name, int type)    {        Node first = current.getNextSibling();        if (first == null)            return null;        for (Node node = first; node != null; node = node.getNextSibling())        {            if (type >= 0 && node.getNodeType() != type)                continue;            //System.out.println("getNode: " + name + " " +            // node.getNodeName());            if (name == null)                return node;            if (name.equals(node.getNodeName()))            {                return node;            }        }        return null;    }    public static class NullResolver implements EntityResolver    {        public InputSource resolveEntity(String publicId, String systemId)                throws SAXException, IOException        {            return new InputSource(new StringReader(""));        }    }    /**     * Read XML as DOM.     */    public static Document readXml(InputStream is) throws SAXException,            IOException, ParserConfigurationException    {        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();        dbf.setValidating(false);        dbf.setIgnoringComments(false);        dbf.setIgnoringElementContentWhitespace(true);        dbf.setNamespaceAware(true);        DocumentBuilder db = null;        db = dbf.newDocumentBuilder();        db.setEntityResolver(new NullResolver());        Document doc = db.parse(is);        return doc;    }    public static void writeXml(Node n, OutputStream os)            throws TransformerException    {        TransformerFactory tf = TransformerFactory.newInstance();        //identity        Transformer t = tf.newTransformer();        t.setOutputProperty(OutputKeys.INDENT, "yes");        t.transform(new DOMSource(n), new StreamResult(os));    }        public static Document createDocument()    {        try        {            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();            DocumentBuilder b = factory.newDocumentBuilder();                        return b.newDocument();        }        catch (ParserConfigurationException e)        {            throw new XFireRuntimeException("Couldn't find a DOM parser.", e);        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久免费看少妇高潮| 石原莉奈在线亚洲三区| 欧美一区二区三区男人的天堂| 国产一区二区三区免费播放| 亚洲一区影音先锋| 亚洲欧洲另类国产综合| 日韩精品一区二区三区在线 | 26uuu成人网一区二区三区| 91美女在线观看| 成人性色生活片| 国产福利一区在线| 久草精品在线观看| 久久国产免费看| 免费人成在线不卡| 日韩经典中文字幕一区| 性感美女久久精品| 亚洲电影第三页| 亚洲影视资源网| 亚洲丝袜另类动漫二区| 精品盗摄一区二区三区| 国产视频一区二区三区在线观看| 欧美探花视频资源| 欧洲av在线精品| 在线成人免费视频| 欧美肥妇free| 精品第一国产综合精品aⅴ| 精品日韩在线一区| 欧美成人三级电影在线| 欧美电视剧在线观看完整版| 精品国产91久久久久久久妲己| 精品三级在线看| 欧美激情中文不卡| 亚洲色大成网站www久久九九| 亚洲视频 欧洲视频| 一区二区三区波多野结衣在线观看| 亚洲一区二区三区四区五区黄| 亚洲午夜电影在线| 美女网站一区二区| 国产成人欧美日韩在线电影| 国产很黄免费观看久久| av男人天堂一区| 欧美人牲a欧美精品| 精品久久久影院| 国产精品久久久久一区二区三区| 亚洲欧美日韩中文播放| 天天影视网天天综合色在线播放| 久久疯狂做爰流白浆xx| 成人精品一区二区三区中文字幕| 在线视频一区二区免费| 日韩欧美久久久| 国产精品成人免费在线| 午夜a成v人精品| 韩国精品免费视频| 色婷婷久久综合| 久久午夜免费电影| 一区二区在线免费观看| 免费美女久久99| 91在线视频免费观看| 欧美成人官网二区| 亚洲免费观看视频| 黄网站免费久久| 欧美日韩国产在线观看| 26uuu另类欧美| 亚洲第一狼人社区| 粉嫩av一区二区三区粉嫩| 欧美日本乱大交xxxxx| 久久久久9999亚洲精品| 日日夜夜一区二区| 最新高清无码专区| 粉嫩av一区二区三区在线播放 | 亚洲视频狠狠干| 色视频一区二区| 老司机精品视频一区二区三区| www.欧美精品一二区| 性做久久久久久久久| 色欧美日韩亚洲| 在线成人av影院| 洋洋av久久久久久久一区| 国产91丝袜在线18| 精品福利一区二区三区| 美女视频黄免费的久久| 欧美日韩精品综合在线| 亚洲日本一区二区三区| 九九精品视频在线看| 欧美日韩亚洲高清一区二区| 亚洲日本在线视频观看| 国产不卡视频一区| 国产日产欧产精品推荐色| 久久99精品国产麻豆婷婷 | 亚洲免费毛片网站| av在线一区二区三区| 国产欧美日韩在线| 国产精品一二三在| 久久久久9999亚洲精品| 国产福利精品一区二区| 久久久精品国产免费观看同学| 蜜臀av国产精品久久久久| 欧美日韩精品欧美日韩精品一综合 | 亚洲制服丝袜av| 色婷婷久久久久swag精品 | 免费成人在线观看| 91精品国产综合久久精品app| 亚洲一区二区在线播放相泽| 99国产精品久久| 一区二区在线观看视频| 欧美日韩一级视频| 久草热8精品视频在线观看| 精品国产一区二区国模嫣然| 国产伦精品一区二区三区视频青涩 | 精品三级在线看| 国产高清精品网站| 中文字幕中文字幕在线一区| 色呦呦日韩精品| 亚洲国产精品一区二区尤物区| 欧美日高清视频| 韩国三级在线一区| 国产女同性恋一区二区| 91亚洲精华国产精华精华液| 亚洲国产经典视频| 欧美性视频一区二区三区| 日本在线观看不卡视频| 国产欧美一区二区精品性色超碰| 91在线观看高清| 五月婷婷久久丁香| 久久久久国产一区二区三区四区 | 精品一区二区三区香蕉蜜桃| 日韩精品在线一区二区| 福利视频网站一区二区三区| 亚洲日本青草视频在线怡红院| 4438x亚洲最大成人网| 午夜一区二区三区视频| 狠狠色狠狠色综合| 91精品国产福利在线观看| 99热在这里有精品免费| 韩国毛片一区二区三区| 水野朝阳av一区二区三区| 亚洲精品国产a| 国产精品视频免费| 久久综合色播五月| 欧美一区二区三区婷婷月色| 欧美中文字幕一二三区视频| 成人国产精品免费观看动漫| 国产91露脸合集magnet| 国产一区二区日韩精品| 精品一区二区三区在线观看| 免费看日韩精品| 日韩va欧美va亚洲va久久| 日韩欧美中文字幕公布| 午夜欧美在线一二页| 国产无一区二区| 欧美日韩一区二区三区在线| 加勒比av一区二区| 成人免费一区二区三区在线观看 | 久久久三级国产网站| 亚洲永久精品国产| 精品久久久久久久久久久院品网 | 91麻豆产精品久久久久久| 国产成人午夜视频| 成人一区二区视频| 大胆欧美人体老妇| 99精品视频一区| 在线观看中文字幕不卡| 欧美亚洲高清一区| 777午夜精品免费视频| 欧美高清视频一二三区| 日韩欧美国产一区在线观看| 91麻豆精品国产91久久久资源速度 | 国产一区二区伦理| 国产成人免费视频精品含羞草妖精| 国产精品小仙女| 91亚洲永久精品| 在线不卡免费欧美| 日韩视频一区二区| 国产色91在线| 一区二区三区在线观看视频| 亚洲电影视频在线| 蜜桃传媒麻豆第一区在线观看| 国产在线国偷精品产拍免费yy| 国产91精品精华液一区二区三区| av激情成人网| 欧美日韩激情一区二区三区| 亚洲精品一区二区精华| 中文字幕中文字幕在线一区 | 亚洲成人精品一区| 久久国产剧场电影| 99精品热视频| 日韩免费在线观看| 亚洲女同ⅹxx女同tv| 免费在线观看成人| 99麻豆久久久国产精品免费| 欧美男男青年gay1069videost | 欧美唯美清纯偷拍| 久久久久久一级片| 亚洲一区二区欧美日韩| 国产一区二区久久| 在线视频你懂得一区二区三区| 精品美女在线观看| 亚洲综合色区另类av| 国产成人精品影视| 欧美美女网站色|