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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? node.java

?? wap瀏覽器 日程安排 Rss 棋牌游戲
?? JAVA
字號(hào):
/* Copyright (c) 2002,2003, Stefan Haustein, Oberhausen, Rhld., Germany * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The  above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */package org.kxml2.kdom;import java.util.*;import java.io.*;import org.xmlpull.v1.*;/** A common base class for Document and Element, also used for    storing XML fragments. */public class Node { //implements XmlIO{    public static final int DOCUMENT = 0;    public static final int ELEMENT = 2;    public static final int TEXT = 4;    public static final int CDSECT = 5;    public static final int ENTITY_REF = 6;    public static final int IGNORABLE_WHITESPACE = 7;    public static final int PROCESSING_INSTRUCTION = 8;    public static final int COMMENT = 9;    public static final int DOCDECL = 10;    protected Vector children;    protected StringBuffer types;    /** inserts the given child object of the given type at the    given index. */    public void addChild(int index, int type, Object child) {        if (child == null)            throw new NullPointerException();        if (children == null) {            children = new Vector();            types = new StringBuffer();        }        if (type == ELEMENT) {            if (!(child instanceof Element))                throw new RuntimeException("Element obj expected)");            ((Element) child).setParent(this);        }        else if (!(child instanceof String))            throw new RuntimeException("String expected");        children.insertElementAt(child, index);        types.insert(index, (char) type);    }    /** convenience method for addChild (getChildCount (), child) */    public void addChild(int type, Object child) {        addChild(getChildCount(), type, child);    }    /** Builds a default element with the given properties. Elements    should always be created using this method instead of the    constructor in order to enable construction of specialized    subclasses by deriving custom Document classes. Please note:    For no namespace, please use Xml.NO_NAMESPACE, null is not a    legal value. Currently, null is converted to Xml.NO_NAMESPACE,    but future versions may throw an exception. */    public Element createElement(String namespace, String name) {        Element e = new Element();        e.namespace = namespace == null ? "" : namespace;        e.name = name;        return e;    }    /** Returns the child object at the given index.  For child        elements, an Element object is returned. For all other child        types, a String is returned. */    public Object getChild(int index) {        return children.elementAt(index);    }    /** Returns the number of child objects */    public int getChildCount() {        return children == null ? 0 : children.size();    }    /** returns the element at the given index. If the node at the    given index is a text node, null is returned */    public Element getElement(int index) {        Object child = getChild(index);        return (child instanceof Element) ? (Element) child : null;    }    /** Returns the element with the given namespace and name. If the        element is not found, or more than one matching elements are        found, an exception is thrown. */    public Element getElement(String namespace, String name) {        int i = indexOf(namespace, name, 0);        int j = indexOf(namespace, name, i + 1);        if (i == -1 || j != -1)            throw new RuntimeException(                "Element {"                    + namespace                    + "}"                    + name                    + (i == -1 ? " not found in " : " more than once in ")                    + this);        return getElement(i);    }    /* returns "#document-fragment". For elements, the element name is returned         public String getName() {        return "#document-fragment";    }        /** Returns the namespace of the current element. For Node        and Document, Xml.NO_NAMESPACE is returned.         public String getNamespace() {        return "";    }        public int getNamespaceCount () {    	return 0;    }        /** returns the text content if the element has text-only    content. Throws an exception for mixed content        public String getText() {            StringBuffer buf = new StringBuffer();        int len = getChildCount();            for (int i = 0; i < len; i++) {            if (isText(i))                buf.append(getText(i));            else if (getType(i) == ELEMENT)                throw new RuntimeException("not text-only content!");        }            return buf.toString();    }    */    /** Returns the text node with the given index or null if the node        with the given index is not a text node. */    public String getText(int index) {        return (isText(index)) ? (String) getChild(index) : null;    }    /** Returns the type of the child at the given index. Possible     types are ELEMENT, TEXT, COMMENT, and PROCESSING_INSTRUCTION */    public int getType(int index) {        return types.charAt(index);    }    /** Convenience method for indexOf (getNamespace (), name,        startIndex).         public int indexOf(String name, int startIndex) {        return indexOf(getNamespace(), name, startIndex);    }    */    /** Performs search for an element with the given namespace and    name, starting at the given start index. A null namespace    matches any namespace, please use Xml.NO_NAMESPACE for no    namespace).  returns -1 if no matching element was found. */    public int indexOf(String namespace, String name, int startIndex) {        int len = getChildCount();        for (int i = startIndex; i < len; i++) {            Element child = getElement(i);            if (child != null                && name.equals(child.getName())                && (namespace == null || namespace.equals(child.getNamespace())))                return i;        }        return -1;    }    public boolean isText(int i) {        int t = getType(i);        return t == TEXT || t == IGNORABLE_WHITESPACE || t == CDSECT;    }    /** Recursively builds the child elements from the given parser    until an end tag or end document is found.         The end tag is not consumed. */    public void parse(XmlPullParser parser)        throws IOException, XmlPullParserException {        boolean leave = false;        do {            int type = parser.getEventType();               //         System.out.println(parser.getPositionDescription());                        switch (type) {                case XmlPullParser.START_TAG :                    {                        Element child =                            createElement(                                parser.getNamespace(),                                parser.getName());                        //    child.setAttributes (event.getAttributes ());                        addChild(ELEMENT, child);                        // order is important here since                         // setparent may perform some init code!                        child.parse(parser);                        break;                    }                case XmlPullParser.END_DOCUMENT :                case XmlPullParser.END_TAG :                    leave = true;                    break;                default :                    if (parser.getText() != null)                        addChild(                            type == XmlPullParser.ENTITY_REF ? TEXT : type,                            parser.getText());                    else if (                        type == XmlPullParser.ENTITY_REF                            && parser.getName() != null) {                        addChild(ENTITY_REF, parser.getName());                    }                    parser.nextToken();            }        }        while (!leave);    }    /** Removes the child object at the given index */    public void removeChild(int idx) {        children.removeElementAt(idx);        /***  Modification by HHS - start ***/        //      types.deleteCharAt (index);        /***/        int n = types.length() - 1;        for (int i = idx; i < n; i++)            types.setCharAt(i, types.charAt(i + 1));        types.setLength(n);        /***  Modification by HHS - end   ***/    }    /* returns a valid XML representation of this Element including    	attributes and children.     public String toString() {        try {            ByteArrayOutputStream bos =                new ByteArrayOutputStream();            XmlWriter xw =                new XmlWriter(new OutputStreamWriter(bos));            write(xw);            xw.close();            return new String(bos.toByteArray());        }        catch (IOException e) {            throw new RuntimeException(e.toString());        }    }    */    /** Writes this node to the given XmlWriter. For node and document,        this method is identical to writeChildren, except that the        stream is flushed automatically. */    public void write(XmlSerializer writer) throws IOException {        writeChildren(writer);        writer.flush();    }    /** Writes the children of this node to the given XmlWriter. */    public void writeChildren(XmlSerializer writer) throws IOException {        if (children == null)            return;        int len = children.size();        for (int i = 0; i < len; i++) {            int type = getType(i);            Object child = children.elementAt(i);            switch (type) {                case ELEMENT :                     ((Element) child).write(writer);                    break;                case TEXT :                    writer.text((String) child);                    break;                case IGNORABLE_WHITESPACE :                    writer.ignorableWhitespace((String) child);                    break;                case CDSECT :                    writer.cdsect((String) child);                    break;                case COMMENT :                    writer.comment((String) child);                    break;                case ENTITY_REF :                    writer.entityRef((String) child);                    break;                case PROCESSING_INSTRUCTION :                    writer.processingInstruction((String) child);                    break;                case DOCDECL :                    writer.docdecl((String) child);                    break;                default :                    throw new RuntimeException("Illegal type: " + type);            }        }    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91黄色免费网站| 在线观看网站黄不卡| 国产精品成人免费在线| 精品美女在线观看| 成人99免费视频| 日韩一区精品字幕| 亚洲蜜臀av乱码久久精品 | 97精品国产露脸对白| 视频一区视频二区中文| 亚洲人吸女人奶水| 久久精品夜夜夜夜久久| 91精品国产高清一区二区三区蜜臀 | 亚洲精品水蜜桃| 久久综合av免费| 制服丝袜成人动漫| 精品视频999| 色婷婷亚洲综合| 国产精品乡下勾搭老头1| 石原莉奈在线亚洲二区| 亚洲午夜免费电影| 亚洲色图视频网| 欧美—级在线免费片| 精品av久久707| 欧美一个色资源| 91精品免费在线| 欧美精品在欧美一区二区少妇| 色网站国产精品| 99精品黄色片免费大全| 福利一区福利二区| 国产福利精品导航| 国产一区二区在线观看免费| 蜜臀久久久99精品久久久久久| 午夜日韩在线观看| 亚洲超碰97人人做人人爱| 亚洲综合999| 亚洲mv在线观看| 日韩专区欧美专区| 日韩国产在线观看| 另类小说图片综合网| 久88久久88久久久| 国产一区二区精品久久91| 国产资源精品在线观看| 国产激情视频一区二区三区欧美 | 日韩一区二区在线看| 欧美一区二区三区在线| 日韩欧美中文字幕公布| 日韩精品在线网站| 久久久噜噜噜久久中文字幕色伊伊 | 一区二区三区中文在线观看| 亚洲精品视频在线| 亚洲福利一区二区| 日本女人一区二区三区| 精品无人码麻豆乱码1区2区 | 亚洲韩国一区二区三区| 污片在线观看一区二区| 日本视频在线一区| 国产美女精品在线| 99国产精品久久久久久久久久 | 最新欧美精品一区二区三区| 亚洲美女免费在线| 日本女优在线视频一区二区| 狠狠色综合播放一区二区| 国产99一区视频免费| 色综合久久久久网| 在线成人免费视频| 2023国产精华国产精品| 中文字幕一区二区三区四区不卡 | 亚洲国产欧美一区二区三区丁香婷| 午夜欧美视频在线观看| 国产美女在线观看一区| 91一区一区三区| 在线播放/欧美激情| wwwwww.欧美系列| 亚洲精品综合在线| 蜜臀av在线播放一区二区三区| 国产99久久久国产精品潘金| 欧美影院精品一区| 精品欧美乱码久久久久久 | 精品久久久久久久人人人人传媒| 久久久精品tv| 亚洲成人免费av| 国产成人自拍网| 欧美人与性动xxxx| 国产精品欧美一级免费| 五月激情综合婷婷| av亚洲精华国产精华精华| 国产亚洲短视频| 夜夜揉揉日日人人青青一国产精品| 免费不卡在线观看| 色噜噜狠狠色综合中国| 欧美精品一区二| 亚洲在线观看免费| 国产成人综合网站| 91精品国产91久久久久久最新毛片| 国产精品国产三级国产有无不卡 | 色综合久久久久综合| 精品久久久久久久久久久久久久久久久| 最新久久zyz资源站| 久久成人av少妇免费| 欧美亚洲国产bt| 国产精品乱码久久久久久| 蜜臀va亚洲va欧美va天堂 | 欧美大片在线观看一区二区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 欧美午夜精品一区二区蜜桃| 久久久久久久电影| 日本不卡一二三区黄网| 在线看日本不卡| 中文字幕一区二区不卡| 国产精品一二三区在线| 日韩三级免费观看| 天天av天天翘天天综合网 | 欧美高清www午色夜在线视频| 亚洲人快播电影网| 成人永久aaa| 国产女同性恋一区二区| 美女国产一区二区三区| 欧美美女bb生活片| 亚洲精品高清在线| 91捆绑美女网站| 国产精品萝li| 国产suv精品一区二区6| 精品国产免费久久 | 国产精品影视在线| 精品福利一二区| 另类的小说在线视频另类成人小视频在线| 欧美性色黄大片| 亚洲综合一二三区| 欧美三级视频在线播放| 亚洲一区二区不卡免费| 日韩欧美亚洲国产精品字幕久久久| 午夜精品久久久久久久久久久| 在线观看亚洲精品| 亚洲不卡av一区二区三区| 欧美日韩一区二区三区四区| 亚洲一二三四在线| 欧美日韩一级二级| 午夜一区二区三区在线观看| 欧美视频一区在线| 日韩电影免费一区| 欧美一区二区三区不卡| 久久国产精品第一页| 精品福利一区二区三区免费视频| 久久99国产精品尤物| 久久精品人人做| 9i在线看片成人免费| 亚洲免费在线看| 欧美日韩国产小视频| 日韩不卡在线观看日韩不卡视频| 日韩一区二区视频| 国产一区二区三区日韩| 国产精品久久精品日日| 色一情一伦一子一伦一区| 亚洲网友自拍偷拍| 精品久久人人做人人爽| 国产成人午夜电影网| 亚洲欧美日韩成人高清在线一区| 在线精品视频免费观看| 日韩av网站免费在线| 久久嫩草精品久久久精品一| 成人精品在线视频观看| 亚洲综合偷拍欧美一区色| 欧美一区二区三区在线观看视频| 国产在线日韩欧美| 亚洲色图20p| 538prom精品视频线放| 国产精品99久| 亚洲专区一二三| 精品国产91亚洲一区二区三区婷婷 | 亚洲国产一二三| 欧美r级在线观看| 99国产精品国产精品久久| 亚瑟在线精品视频| 国产视频亚洲色图| 欧美亚洲国产bt| 国产美女视频91| 亚洲成人动漫一区| 国产午夜精品福利| 欧美日韩中文字幕精品| 国产精品一区免费在线观看| 一区二区三区四区高清精品免费观看| 欧美精品 国产精品| 成人福利视频在线看| 喷白浆一区二区| 亚洲天堂a在线| 精品播放一区二区| 欧美日韩一本到| 成人av午夜电影| 精品一区二区三区欧美| 亚洲精品中文在线观看| 久久网站最新地址| 中文字幕不卡一区| 欧美日韩国产高清一区二区| 国产精品一卡二卡在线观看| 天堂蜜桃一区二区三区| 国产精品成人午夜| 久久综合狠狠综合| 91精品国产综合久久香蕉麻豆| 不卡的av电影在线观看| 激情亚洲综合在线|