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

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

?? xml.java

?? Foundations_Of_Ajax中文版的源代碼
?? JAVA
字號:
package org.json;/*Copyright (c) 2002 JSON.orgPermission 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 shall be used for Good, not Evil.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.*/import java.util.Iterator;import java.text.ParseException;/** * This provides static methods to convert an XML text into a JSONObject, * and to covert a JSONObject into an XML text. * @author JSON.org * @version 0.1 */public class XML {    private XML() {}    /** The Character '&'. */    public static final Character AMP   = new Character('&');    /** The Character '''. */    public static final Character APOS  = new Character('\'');    /** The Character '!'. */    public static final Character BANG  = new Character('!');    /** The Character '='. */    public static final Character EQ    = new Character('=');    /** The Character '>'. */    public static final Character GT    = new Character('>');    /** The Character '<'. */    public static final Character LT    = new Character('<');    /** The Character '?'. */    public static final Character QUEST = new Character('?');    /** The Character '"'. */    public static final Character QUOT  = new Character('"');    /** The Character '/'. */    public static final Character SLASH = new Character('/');    /**     * Replace special characters with XML escapes:      * <pre>     * &amp; is replaced by &amp;amp;      * &lt; is replaced by &amp;lt;      * &gt; is replaced by &amp;gt;     * &quot; is replaced by &amp;quot;      * </pre>     */    public static String escape(String string) {        return string            .replaceAll("&", "&amp;")            .replaceAll("<", "&lt;")            .replaceAll(">", "&gt;")            .replaceAll("\"", "&quot;");    }    /**     * Scan the content following the named tag, attaching it to the context.     * @param x       The XMLTokener containing the source string.     * @param context The JSONObject that will include the new material.     * @param name    The tag name.     * @return true if the close tag is processed.     * @throws ParseException     */    private static boolean parse(XMLTokener x, JSONObject context,                                 String name) throws ParseException {        char       c;        int        i;        String     n;        JSONObject o;        String     s;        Object     t;// Test for and skip past these forms://      <!-- ... -->//      <!   ...   >//      <![  ... ]]>//      <?   ...  ?>// Report errors for these forms://      <>//      <=//      <<        t = x.nextToken();// <!        if (t == BANG) {            c = x.next();            if (c == '-') {                if (x.next() == '-') {                    x.skipPast("-->");                    return false;                }                x.back();            } else if (c == '[') {                x.skipPast("]]>");                return false;            }            i = 1;            do {                t = x.nextMeta();                if (t == null) {                    throw x.syntaxError("Missing '>' after '<!'.");                } else if (t == LT) {                    i += 1;                } else if (t == GT) {                    i -= 1;                }            } while (i > 0);            return false;        } else if (t == QUEST) {// <?            x.skipPast("?>");            return false;        } else if (t == SLASH) {// Close tag </            if (name == null || !x.nextToken().equals(name)) {                throw x.syntaxError("Mismatched close tag");            }            if (x.nextToken() != GT) {                throw x.syntaxError("Misshaped close tag");            }            return true;        } else if (t instanceof Character) {            throw x.syntaxError("Misshaped tag");// Open tag <        } else {            n = (String)t;            t = null;            o = new JSONObject();            while (true) {                if (t == null) {                    t = x.nextToken();                }// attribute = value                if (t instanceof String) {                    s = (String)t;                    t = x.nextToken();                    if (t == EQ) {                        t = x.nextToken();                        if (!(t instanceof String)) {                            throw x.syntaxError("Missing value");                        }                        o.accumulate(s, t);                        t = null;                    } else {                        o.accumulate(s, Boolean.TRUE);                    }// Empty tag <.../>                } else if (t == SLASH) {                    if (x.nextToken() != GT) {                        throw x.syntaxError("Misshaped tag");                    }                    if (o.length() == 0) {                        context.accumulate(n, Boolean.TRUE);                    } else {                        context.accumulate(n, o);                    }                    return false;// Content, between <...> and </...>                } else if (t == GT) {                    while (true) {                        t = x.nextContent();                        if (t == null) {                            if (name != null) {                                throw x.syntaxError("Unclosed tag " + name);                            }                            return false;                        } else if (t instanceof String) {                            s = (String)t;                            if (s.length() > 0) {                                o.accumulate("content", s);                            }// Nested element                        } else if (t == LT) {                            if (parse(x, o, n)) {                                if (o.length() == 0) {                                    context.accumulate(n, Boolean.TRUE);                                } else if (o.length() == 1 &&                                           o.opt("content") != null) {                                    context.accumulate(n, o.opt("content"));                                } else {                                    context.accumulate(n, o);                                }                                return false;                            }                        }                    }                } else {                    throw x.syntaxError("Misshaped tag");                }            }        }    }    /**     * Convert a well-formed (but not necessarily valid) XML string into a     * JSONObject. Some information may be lost in this transformation     * because JSON is a data format and XML is a document format. XML uses     * elements, attributes, and content text, while JSON uses unordered     * collections of name/value pairs and arrays of values. JSON does not     * does not like to distinguish between elements and attributes.     * Sequences of similar elements are represented as JSONArrays. Content     * text may be placed in a "content" member. Comments, prologs, DTDs, and     * <code>&lt;[ [ ]]></code> are ignored.     * @param string The source string.     * @return A JSONObject containing the structured data from the XML string.     * @throws ParseException     */    public static JSONObject toJSONObject(String string) throws ParseException {        JSONObject o = new JSONObject();        XMLTokener x = new XMLTokener(string);        while (x.more()) {            x.skipPast("<");            parse(x, o, null);        }        return o;    }    /**     * Convert a JSONObject into a well-formed XML string.     * @param o A JSONObject.     * @return A string.     */    public static String toString(Object o) {        return toString(o, null);    }    /**     * Convert a JSONObject into a well-formed XML string.     * @param o A JSONObject.     * @param tagName The optional name of the enclosing tag.     * @return A string.     */    public static String toString(Object o, String tagName) {        StringBuffer a = null; // attributes, inside the <...>        StringBuffer b = new StringBuffer(); // body, between <...> and </...>        int          i;        JSONArray    ja;        JSONObject   jo;        String       k;        Iterator     keys;        int          len;        String       s;        Object       v;        if (o instanceof JSONObject) {// Emit <tagName            if (tagName != null) {                a = new StringBuffer();                a.append('<');                a.append(tagName);            }// Loop thru the keys. Some keys will produce attribute material, others// body material.            jo = (JSONObject)o;            keys = jo.keys();            while (keys.hasNext()) {                k = keys.next().toString();                v = jo.get(k);                if (v instanceof String) {                    s = (String)v;                } else {                    s = null;                }// Emit a new tag <k... in body                if (tagName == null || v instanceof JSONObject ||                        (s != null && k != "content" && (s.length() > 60 ||                        (s.indexOf('"') >= 0 && s.indexOf('\'') >= 0)))) {                    b.append(toString(v, k));// Emit content in body                } else if (k.equals("content")) {                    b.append(escape(v.toString()));// Emit an array of similar keys in body                } else if (v instanceof JSONArray) {                    ja = (JSONArray)v;                    len = ja.length();                    for (i = 0; i < len; i += 1) {                        b.append(toString(ja.get(i), k));                    }// Emit an attribute                } else {                    a.append(' ');                    a.append(k);                    a.append('=');                    a.append(toString(v));                }            }            if (tagName != null) {// Close an empty element                if (b.length() == 0) {                    a.append("/>");                } else {// Close the start tag and emit the body and the close tag                    a.append('>');                    a.append(b);                    a.append("</");                    a.append(tagName);                    a.append('>');                }                return a.toString();            }            return b.toString();// XML does not have good support for arrays. If an array appears in a place// where XML is lacking, synthesize an <array> element.        } else if (o instanceof JSONArray) {            ja = (JSONArray)o;            len = ja.length();            for (i = 0; i < len; ++i) {                b.append(toString(                    ja.opt(i), (tagName == null) ? "array" : tagName));            }            return b.toString();        } else {            s = (o == null) ? "null" : escape(o.toString());            return (tagName == null) ?                 "\"" + s + "\"" :                 "<" + tagName + ">" + s + "</" + tagName + ">";        }    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级视频在线看| 国产精品久久久爽爽爽麻豆色哟哟| 久久蜜臀精品av| 亚洲欧美国产高清| 国产麻豆欧美日韩一区| 欧洲视频一区二区| 国产精品网曝门| 久久成人综合网| 欧美性色黄大片| 自拍偷拍亚洲欧美日韩| 国产伦精一区二区三区| 欧美一区二区三区喷汁尤物| 中文字幕高清一区| 国产一区二区影院| 日韩情涩欧美日韩视频| 视频一区国产视频| 欧美人伦禁忌dvd放荡欲情| 17c精品麻豆一区二区免费| 国产激情视频一区二区在线观看 | 国产乱码精品一区二区三区av| 91一区二区在线观看| 久久久久国产精品厨房| 麻豆精品视频在线观看视频| 欧美日韩国产首页| 午夜视频一区二区三区| 欧美最猛黑人xxxxx猛交| 国产精品第13页| 高清国产午夜精品久久久久久| 欧美精品一区二区三区四区 | 欧美久久免费观看| 亚洲午夜羞羞片| 欧美日韩和欧美的一区二区| 一区二区三区在线观看欧美 | 欧美午夜一区二区三区免费大片| 国产精品国产三级国产| av在线播放一区二区三区| 亚洲国产精品av| 99久久er热在这里只有精品15| 国产精品久久久久久久久果冻传媒| 国产91丝袜在线18| 国产精品成人午夜| 色屁屁一区二区| 午夜视黄欧洲亚洲| 欧美成人精品福利| 国产美女一区二区三区| 日本一区二区三区dvd视频在线| 国产jizzjizz一区二区| 亚洲视频香蕉人妖| 在线亚洲免费视频| 成人一区在线看| 久久久久久综合| 国产精品888| 国产欧美综合在线观看第十页| ...xxx性欧美| 国产美女主播视频一区| 日韩精品中文字幕在线一区| 精品亚洲porn| 国产精品免费人成网站| 日本精品裸体写真集在线观看| 图片区日韩欧美亚洲| 欧美精品一区二区三| 高清成人免费视频| 午夜电影一区二区三区| 久久天堂av综合合色蜜桃网| 99国产欧美另类久久久精品| 偷拍自拍另类欧美| 国产日韩av一区二区| 在线国产亚洲欧美| 国产麻豆一精品一av一免费| 亚洲精品高清视频在线观看| 日韩一区二区免费视频| 成人99免费视频| 日本视频一区二区三区| 国产视频不卡一区| 欧美日韩激情一区二区三区| 国产一区二区三区四区五区入口| 亚洲人精品午夜| 欧美剧在线免费观看网站| 国产在线精品视频| 亚洲综合一区在线| 久久精品一区二区| 在线视频综合导航| 成人综合日日夜夜| 激情综合五月婷婷| 亚洲一区二区三区爽爽爽爽爽| 久久理论电影网| 538prom精品视频线放| 99精品在线观看视频| 日韩电影在线观看网站| 1024成人网色www| 欧美成人一级视频| 色噜噜狠狠一区二区三区果冻| 国产伦精品一区二区三区视频青涩 | 日本一区免费视频| 欧美精品日韩综合在线| 99精品在线免费| 成人激情免费网站| 国产一区久久久| 免费在线一区观看| 亚洲图片一区二区| 亚洲日本一区二区三区| 国产欧美在线观看一区| 欧美老年两性高潮| 欧洲色大大久久| 在线视频欧美精品| 日本丶国产丶欧美色综合| 99久久国产综合精品女不卡| 国产成人精品午夜视频免费| 国内精品免费在线观看| 久久99精品久久久久婷婷| 日韩成人免费看| 美国十次了思思久久精品导航| 午夜av电影一区| 天天综合网 天天综合色| 亚洲福利国产精品| 婷婷一区二区三区| 日本人妖一区二区| 欧美aaaaa成人免费观看视频| 午夜一区二区三区视频| 日韩黄色在线观看| 免费看欧美女人艹b| 精品一区二区三区在线视频| 久久精品国产99国产精品| 美女视频网站久久| 国模无码大尺度一区二区三区| 极品瑜伽女神91| 成人免费高清视频| 91啪在线观看| 99精品欧美一区| 欧美性生活久久| 欧美精品久久久久久久多人混战 | 欧美夫妻性生活| 日韩欧美一二三四区| 精品国产乱码久久久久久免费| 欧美精品一区二区三区蜜臀| 日本一区二区三区四区| 久久这里都是精品| 中文字幕亚洲欧美在线不卡| 亚洲色图都市小说| 日日摸夜夜添夜夜添精品视频| 免费观看久久久4p| 成人手机电影网| 欧美四级电影在线观看| 精品欧美一区二区三区精品久久 | 亚洲精品国久久99热| 日韩一区欧美二区| 成人免费精品视频| 欧美日韩国产高清一区二区三区| 26uuu成人网一区二区三区| 中文字幕一区二区三中文字幕| 国产日韩欧美麻豆| 久久久国产一区二区三区四区小说 | 久久se这里有精品| 成年人国产精品| 欧美性一区二区| 欧美国产综合一区二区| 一区二区三区成人| 精久久久久久久久久久| 一本色道a无线码一区v| 久久亚洲综合色| 一区二区三区四区在线| 久久国产精品露脸对白| 色婷婷av久久久久久久| 2020国产精品自拍| 午夜视频在线观看一区| 成人精品国产免费网站| 日韩视频一区二区三区在线播放| 日韩毛片高清在线播放| 激情丁香综合五月| 9191成人精品久久| 亚洲精品视频在线| 国产成人啪免费观看软件| 在线不卡a资源高清| 日韩美女视频一区二区| 国模大尺度一区二区三区| 欧美日韩精品三区| 亚洲精品大片www| a在线播放不卡| 日本一二三不卡| 国产一区在线看| 日韩午夜中文字幕| 天天亚洲美女在线视频| 色婷婷综合激情| 亚洲欧美一区二区三区国产精品 | 婷婷久久综合九色国产成人| 不卡av在线网| 国产欧美日韩另类一区| 韩国女主播成人在线| 欧美一区二区三区影视| 日产欧产美韩系列久久99| 在线亚洲高清视频| 一区二区激情视频| 91欧美一区二区| 国产精品不卡在线| 成人免费毛片片v| 国产精品久久午夜| 成人手机在线视频| ㊣最新国产の精品bt伙计久久| 成人性生交大片免费看中文| 欧美极品aⅴ影院|