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

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

?? element.java

?? < JavaME核心技術(shù)最佳實(shí)踐>>的全部源代碼
?? 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.io.*;import java.util.*;import org.xmlpull.v1.*;/**  * In order to create an element, please use the createElement method * instead of invoking the constructor directly. The right place to * add user defined initialization code is the init method. */public class Element extends Node {    protected String namespace;    protected String name;    protected Vector attributes;    protected Node parent;    protected Vector prefixes;    public Element() {    }    /**      * called when all properties are set, but before children     * are parsed. Please do not use setParent for initialization     * code any longer. */    public void init() {    }    /**      * removes all children and attributes */    public void clear() {        attributes = null;        children = null;    }    /**      * Forwards creation request to parent if any, otherwise     * calls super.createElement. */    public Element createElement(        String namespace,        String name) {         return (this.parent == null)            ? super.createElement(namespace, name)            : this.parent.createElement(namespace, name);    }    /**      * Returns the number of attributes of this element. */    public int getAttributeCount() {        return attributes == null ? 0 : attributes.size ();    }	public String getAttributeNamespace (int index) {		return ((String []) attributes.elementAt (index)) [0];	}/*	public String getAttributePrefix (int index) {		return ((String []) attributes.elementAt (index)) [1];	}*/		public String getAttributeName (int index) {		return ((String []) attributes.elementAt (index)) [1];	}		public String getAttributeValue (int index) {		return ((String []) attributes.elementAt (index)) [2];	}			public String getAttributeValue (String namespace, String name) {		for (int i = 0; i < getAttributeCount (); i++) {			if (name.equals (getAttributeName (i)) 				&& (namespace == null || namespace.equals (getAttributeNamespace(i)))) {				return getAttributeValue (i);			}		}								return null;				}    /**      * Returns the root node, determined by ascending to the      * all parents un of the root element. */    public Node getRoot() {        Element current = this;                while (current.parent != null) {            if (!(current.parent instanceof Element)) return current.parent;            current = (Element) current.parent;        }                return current;    }    /**      * returns the (local) name of the element */    public String getName() {        return name;    }    /**      * returns the namespace of the element */    public String getNamespace() {        return namespace;    }    /**      * returns the namespace for the given prefix */        public String getNamespaceUri (String prefix) {    	int cnt = getNamespaceCount ();		for (int i = 0; i < cnt; i++) {			if (prefix == getNamespacePrefix (i) ||				(prefix != null && prefix.equals (getNamespacePrefix (i))))				return getNamespaceUri (i);			}		return parent instanceof Element ? ((Element) parent).getNamespaceUri (prefix) : null;    }	/**      * returns the number of declared namespaces, NOT including	 * parent elements */	public int getNamespaceCount () {		return (prefixes == null ? 0 : prefixes.size ());	}	public String getNamespacePrefix (int i) {		return ((String []) prefixes.elementAt (i)) [0];	}	public String getNamespaceUri (int i) {		return ((String []) prefixes.elementAt (i)) [1];	}    /**      * Returns the parent node of this element */    public Node getParent() {        return parent;    }    /*      * Returns the parent element if available, null otherwise     public Element getParentElement() {        return (parent instanceof Element)            ? ((Element) parent)            : null;    }*/    /**      * Builds the child elements from the given Parser. By overwriting      * parse, an element can take complete control over parsing its      * subtree. */    public void parse(XmlPullParser parser)        throws IOException, XmlPullParserException {        for (int i = parser.getNamespaceCount (parser.getDepth () - 1);        	i < parser.getNamespaceCount (parser.getDepth ()); i++) {        	setPrefix (parser.getNamespacePrefix (i), parser.getNamespaceUri(i));        }                        for (int i = 0; i < parser.getAttributeCount (); i++) 	        setAttribute (parser.getAttributeNamespace (i),//	        			  parser.getAttributePrefix (i),	        			  parser.getAttributeName (i),	        			  parser.getAttributeValue (i));        //        if (prefixMap == null) throw new RuntimeException ("!!");        init();		if (parser.isEmptyElementTag()) 			parser.nextToken ();		else {			parser.nextToken ();	        super.parse(parser);        	if (getChildCount() == 0)            	addChild(IGNORABLE_WHITESPACE, "");		}		        parser.require(            XmlPullParser.END_TAG,            getNamespace(),            getName());                    parser.nextToken ();    }    /**      * Sets the given attribute; a value of null removes the attribute */	public void setAttribute (String namespace, String name, String value) {		if (attributes == null) 			attributes = new Vector ();		if (namespace == null) 			namespace = "";		        for (int i = attributes.size()-1; i >=0; i--){            String[] attribut = (String[]) attributes.elementAt(i);            if (attribut[0].equals(namespace) &&				attribut[1].equals(name)){									if (value == null) {	                attributes.removeElementAt(i);				}				else {					attribut[2] = value;				}	            return; 			}        }		attributes.addElement 			(new String [] {namespace, name, value});	}	/**      * Sets the given prefix; a namespace value of null removess the 	 * prefix */	public void setPrefix (String prefix, String namespace) {		if (prefixes == null) prefixes = new Vector ();		prefixes.addElement (new String [] {prefix, namespace});			}    /**      * sets the name of the element */    public void setName(String name) {        this.name = name;    }    /**      * sets the namespace of the element. 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 void setNamespace(String namespace) {        if (namespace == null)         	throw new NullPointerException ("Use \"\" for empty namespace");        this.namespace = namespace;    }    /**      * Sets the Parent of this element. Automatically called from the     * add method.  Please use with care, you can simply     * create inconsitencies in the document tree structure using     * this method!  */    protected void setParent(Node parent) {        this.parent = parent;    }    /**      * Writes this element and all children to the given XmlWriter. */    public void write(XmlSerializer writer)        throws IOException {		if (prefixes != null) {			for (int i = 0; i < prefixes.size (); i++) {				writer.setPrefix (getNamespacePrefix (i), getNamespaceUri (i));			}		}        writer.startTag(            getNamespace(),            getName());        int len = getAttributeCount();        for (int i = 0; i < len; i++) {            writer.attribute(                getAttributeNamespace(i),                getAttributeName(i),                getAttributeValue(i));        }        writeChildren(writer);        writer.endTag(getNamespace (), getName ());    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩午夜激情av| 中文字幕在线不卡国产视频| 欧洲一区二区三区免费视频| 国产高清一区日本| 麻豆91免费观看| 婷婷亚洲久悠悠色悠在线播放| 亚洲女子a中天字幕| 日本一区二区不卡视频| 欧美精品一区二区三区四区| 欧美二区乱c少妇| 在线播放亚洲一区| 欧美日本乱大交xxxxx| 欧美做爰猛烈大尺度电影无法无天| eeuss影院一区二区三区| 成人国产亚洲欧美成人综合网 | 亚洲第一综合色| 夜夜嗨av一区二区三区中文字幕| 国产精品久久久一区麻豆最新章节| 久久久久久久久免费| 欧美精品一区二区三| 欧美电影免费提供在线观看| 91精品国产综合久久蜜臀 | 91久久国产综合久久| 91网站最新地址| 99re热这里只有精品视频| av福利精品导航| 高清视频一区二区| 99视频热这里只有精品免费| 顶级嫩模精品视频在线看| 国产999精品久久| 成人爱爱电影网址| 99久久99久久免费精品蜜臀| 97aⅴ精品视频一二三区| 一本大道久久a久久综合婷婷| 99精品热视频| 欧美偷拍一区二区| 7777精品伊人久久久大香线蕉经典版下载| 欧美日韩免费一区二区三区 | 国产成人在线电影| 成熟亚洲日本毛茸茸凸凹| 不卡视频免费播放| 91在线精品秘密一区二区| 欧美色视频一区| 欧美一区二区视频免费观看| 日韩精品一区二区三区视频在线观看 | 成人免费视频播放| 97精品电影院| 91.成人天堂一区| 精品免费国产二区三区| 国产片一区二区三区| 精品精品国产高清a毛片牛牛| 日韩你懂的在线观看| 欧美精品一区在线观看| 国产日韩欧美精品在线| 日本一区二区三区四区在线视频| 日韩美女啊v在线免费观看| 亚洲成a天堂v人片| 日本美女一区二区三区| 极品尤物av久久免费看| 粉嫩绯色av一区二区在线观看| 99riav一区二区三区| 日韩一区二区不卡| 国产精品久久久久久久久晋中 | 亚洲欧美区自拍先锋| 日日夜夜精品免费视频| 成人一级片网址| 欧美肥妇毛茸茸| 中文一区在线播放| 日韩国产欧美三级| aaa亚洲精品一二三区| 在线成人免费观看| 国产精品高潮久久久久无| 三级久久三级久久| 91啪亚洲精品| 26uuu亚洲综合色欧美| 亚洲免费视频中文字幕| 韩国在线一区二区| 欧美日韩国产成人在线免费| 国产三级三级三级精品8ⅰ区| 亚洲自拍偷拍网站| 成人综合激情网| 日韩欧美三级在线| 亚洲最大成人网4388xx| 国产成人免费在线观看不卡| 欧美电影影音先锋| 亚洲乱码中文字幕| 岛国一区二区三区| 日韩免费一区二区三区在线播放| 亚洲精品免费看| 成人污视频在线观看| 精品国产乱码久久久久久夜甘婷婷| 一区二区三区中文在线观看| 激情综合色播五月| 色激情天天射综合网| 久久久久久久久久久久电影| 日日夜夜精品视频免费| 日本精品免费观看高清观看| 国产日本欧洲亚洲| 久草这里只有精品视频| 欧美日韩综合在线| 一区二区三区四区中文字幕| 成人一区二区在线观看| 久久精品欧美日韩精品| 久久精品二区亚洲w码| 在线不卡a资源高清| 亚洲一区电影777| 色综合久久综合中文综合网| 中文字幕精品一区二区精品绿巨人| 美女一区二区久久| 91精品国模一区二区三区| 亚洲一区二区三区在线看| 91网站在线播放| 中文字幕日韩一区| av高清久久久| 中文字幕综合网| av激情综合网| 成人免费视频在线观看| av成人免费在线| 亚洲日本成人在线观看| 成人在线视频一区| 国产精品麻豆一区二区| av成人老司机| 亚洲精品久久久久久国产精华液| 国产在线精品不卡| 精品免费日韩av| 激情文学综合网| 欧美xxxxxxxx| 久久91精品国产91久久小草| 精品视频一区二区三区免费| 亚洲理论在线观看| 欧美日韩的一区二区| 日韩av中文字幕一区二区三区| 欧美一区二区人人喊爽| 蜜臀国产一区二区三区在线播放| 日韩视频在线你懂得| 极品少妇xxxx精品少妇偷拍| 久久综合色8888| 国产成人av一区| 中文字幕亚洲一区二区va在线| av福利精品导航| 亚洲综合精品自拍| 日韩欧美亚洲国产另类| 国产精品一线二线三线精华| 欧美国产禁国产网站cc| 一本大道久久a久久精二百 | 天堂久久久久va久久久久| 欧美一区二区精品久久911| 久久国产尿小便嘘嘘| 国产日韩欧美麻豆| 99re视频精品| 麻豆精品在线看| 欧美高清一级片在线观看| 欧美精选在线播放| 国产一区二区三区在线观看精品| 欧美精品一区二区三区高清aⅴ| 波波电影院一区二区三区| 亚洲午夜在线电影| 久久美女高清视频| av成人免费在线观看| 亚洲一区日韩精品中文字幕| 精品国产免费一区二区三区四区| 豆国产96在线|亚洲| 国产精品久久久久久久久免费相片| 欧美区一区二区三区| 国产美女在线观看一区| 亚洲1区2区3区4区| 国产精品三级视频| 色综合激情五月| 亚洲综合男人的天堂| 欧美一三区三区四区免费在线看 | 国产精品国模大尺度视频| 欧美色倩网站大全免费| 国产九色sp调教91| 日韩精品电影一区亚洲| 国产精品久久久久久久午夜片| 69av一区二区三区| 成人爱爱电影网址| 久久精品国产一区二区三区免费看| 国产精品久久毛片a| 欧美美女一区二区| 91在线观看免费视频| 久久99久久99| 亚洲一区二区偷拍精品| 精品日韩欧美在线| 91在线精品一区二区三区| 美日韩一区二区三区| 日韩一区中文字幕| 亚洲精品在线免费观看视频| 91在线小视频| 国模大尺度一区二区三区| 亚洲国产sm捆绑调教视频| 国产精品美女久久久久aⅴ| 欧美一区二区观看视频| 丁香五精品蜜臀久久久久99网站| 香蕉久久一区二区不卡无毒影院| 久久亚洲春色中文字幕久久久| 欧美日韩国产一级片| 99久久er热在这里只有精品15| 日本不卡视频一二三区| 亚洲综合久久久|