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

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

?? xmlwriter.java

?? openlogic-jdom-1.1-all-src-1.zip 可以用于操作xml文件
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/*--  Copyright (C) 2000 Brett McLaughlin & Jason Hunter. 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 license@jdom.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 (pm@jdom.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 Brett McLaughlin <brett@jdom.org> and  Jason Hunter <jhunter@jdom.org>.  For more information on the  JDOM Project, please see <http://www.jdom.org/>.  */package sax;import java.io.IOException;import java.io.OutputStreamWriter;import java.io.Writer;import java.util.Enumeration;import java.util.HashMap;import java.util.Iterator;import java.util.Map;import org.xml.sax.Attributes;import org.xml.sax.InputSource;import org.xml.sax.SAXException;import org.xml.sax.XMLReader;import org.xml.sax.helpers.NamespaceSupport;/** * Filter to write an XML document from a SAX event stream. * * <i>Code and comments adapted from XMLWriter-0.2, written * by David Megginson and released into the public domain, * without warranty.</i> * * <p>This class can be used by itself or as part of a SAX event * stream: it takes as input a series of SAX2 ContentHandler * events and uses the information in those events to write * an XML document.  Since this class is a filter, it can also * pass the events on down a filter chain for further processing * (you can use the XMLWriter to take a snapshot of the current * state at any point in a filter chain), and it can be * used directly as a ContentHandler for a SAX2 XMLReader.</p> * * <p>The client creates a document by invoking the methods for * standard SAX2 events, always beginning with the * {@link #startDocument startDocument} method and ending with * the {@link #endDocument endDocument} method.</p> * * <p>The following code will send a simple XML document to * standard output:</p> * * <pre> * XMLWriter w = new XMLWriter(); * * w.startDocument(); * w.dataElement("greeting", "Hello, world!"); * w.endDocument(); * </pre> * * <p>The resulting document will look like this:</p> * * <pre> * &lt;?xml version="1.0"?> * * &lt;greeting>Hello, world!&lt;/greeting> * </pre> * * <h2>Whitespace</h2> * * <p>According to the XML Recommendation, <em>all</em> whitespace * in an XML document is potentially significant to an application, * so this class never adds newlines or indentation.  If you * insert three elements in a row, as in</p> * * <pre> * w.dataElement("item", "1"); * w.dataElement("item", "2"); * w.dataElement("item", "3"); * </pre> * * <p>you will end up with</p> * * <pre> * &lt;item>1&lt;/item>&lt;item>3&lt;/item>&lt;item>3&lt;/item> * </pre> * * <p>You need to invoke one of the <var>characters</var> methods * explicitly to add newlines or indentation.  Alternatively, you * can use {@link samples.sax.DataFormatFilter DataFormatFilter} * add linebreaks and indentation (but does not support mixed content * properly).</p> * * * <h2>Namespace Support</h2> * * <p>The writer contains extensive support for XML Namespaces, so that * a client application does not have to keep track of prefixes and * supply <var>xmlns</var> attributes.  By default, the XML writer will * generate Namespace declarations in the form _NS1, _NS2, etc., wherever * they are needed, as in the following example:</p> * * <pre> * w.startDocument(); * w.emptyElement("http://www.foo.com/ns/", "foo"); * w.endDocument(); * </pre> * * <p>The resulting document will look like this:</p> * * <pre> * &lt;?xml version="1.0"?> * * &lt;_NS1:foo xmlns:_NS1="http://www.foo.com/ns/"/> * </pre> * * <p>In many cases, document authors will prefer to choose their * own prefixes rather than using the (ugly) default names.  The * XML writer allows two methods for selecting prefixes:</p> * * <ol> * <li>the qualified name</li> * <li>the {@link #setPrefix setPrefix} method.</li> * </ol> * * <p>Whenever the XML writer finds a new Namespace URI, it checks * to see if a qualified (prefixed) name is also available; if so * it attempts to use the name's prefix (as long as the prefix is * not already in use for another Namespace URI).</p> * * <p>Before writing a document, the client can also pre-map a prefix * to a Namespace URI with the setPrefix method:</p> * * <pre> * w.setPrefix("http://www.foo.com/ns/", "foo"); * w.startDocument(); * w.emptyElement("http://www.foo.com/ns/", "foo"); * w.endDocument(); * </pre> * * <p>The resulting document will look like this:</p> * * <pre> * &lt;?xml version="1.0"?> * * &lt;foo:foo xmlns:foo="http://www.foo.com/ns/"/> * </pre> * * <p>The default Namespace simply uses an empty string as the prefix:</p> * * <pre> * w.setPrefix("http://www.foo.com/ns/", ""); * w.startDocument(); * w.emptyElement("http://www.foo.com/ns/", "foo"); * w.endDocument(); * </pre> * * <p>The resulting document will look like this:</p> * * <pre> * &lt;?xml version="1.0"?> * * &lt;foo xmlns="http://www.foo.com/ns/"/> * </pre> * * <p>By default, the XML writer will not declare a Namespace until * it is actually used.  Sometimes, this approach will create * a large number of Namespace declarations, as in the following * example:</p> * * <pre> * &lt;xml version="1.0"?> * * &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> *  &lt;rdf:Description about="http://www.foo.com/ids/books/12345"> *   &lt;dc:title xmlns:dc="http://www.purl.org/dc/">A Dark Night&lt;/dc:title> *   &lt;dc:creator xmlns:dc="http://www.purl.org/dc/">Jane Smith&lt;/dc:title> *   &lt;dc:date xmlns:dc="http://www.purl.org/dc/">2000-09-09&lt;/dc:title> *  &lt;/rdf:Description> * &lt;/rdf:RDF> * </pre> * * <p>The "rdf" prefix is declared only once, because the RDF Namespace * is used by the root element and can be inherited by all of its * descendants; the "dc" prefix, on the other hand, is declared three * times, because no higher element uses the Namespace.  To solve this * problem, you can instruct the XML writer to predeclare Namespaces * on the root element even if they are not used there:</p> * * <pre> * w.forceNSDecl("http://www.purl.org/dc/"); * </pre> * * <p>Now, the "dc" prefix will be declared on the root element even * though it's not needed there, and can be inherited by its * descendants:</p> * * <pre> * &lt;xml version="1.0"?> * * &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" *             xmlns:dc="http://www.purl.org/dc/"> *  &lt;rdf:Description about="http://www.foo.com/ids/books/12345"> *   &lt;dc:title>A Dark Night&lt;/dc:title> *   &lt;dc:creator>Jane Smith&lt;/dc:title> *   &lt;dc:date>2000-09-09&lt;/dc:title> *  &lt;/rdf:Description> * &lt;/rdf:RDF> * </pre> * * <p>This approach is also useful for declaring Namespace prefixes * that be used by qualified names appearing in attribute values or * character data.</p> * * @see XMLFilterBase */public class XMLWriter extends XMLFilterBase{    ////////////////////////////////////////////////////////////////////    // Constructors.    ////////////////////////////////////////////////////////////////////    /**     * Create a new XML writer.     *     * <p>Write to standard output.</p>     */    public XMLWriter()    {        init(null);    }    /**     * Create a new XML writer.     *     * <p>Write to the writer provided.</p>     *     * @param writer The output destination, or null to use standard     *        output.     */    public XMLWriter(Writer writer)    {        init(writer);    }    /**     * Create a new XML writer.     *     * <p>Use the specified XML reader as the parent.</p>     *     * @param xmlreader The parent in the filter chain, or null     *        for no parent.     */    public XMLWriter(XMLReader xmlreader)    {        super(xmlreader);        init(null);    }    /**     * Create a new XML writer.     *     * <p>Use the specified XML reader as the parent, and write     * to the specified writer.</p>     *     * @param xmlreader The parent in the filter chain, or null     *        for no parent.     * @param writer The output destination, or null to use standard     *        output.     */    public XMLWriter(XMLReader xmlreader, Writer writer)    {        super(xmlreader);        init(writer);    }    /**     * Internal initialization method.     *     * <p>All of the public constructors invoke this method.     *     * @param writer The output destination, or null to use     *        standard output.     */    private void init (Writer writer)    {        setOutput(writer);        nsSupport = new NamespaceSupport();        prefixTable = new HashMap();        forcedDeclTable = new HashMap();        doneDeclTable = new HashMap();    }    ////////////////////////////////////////////////////////////////////    // Public methods.    ////////////////////////////////////////////////////////////////////    /**     * Reset the writer.     *     * <p>This method is especially useful if the writer throws an     * exception before it is finished, and you want to reuse the     * writer for a new document.  It is usually a good idea to     * invoke {@link #flush flush} before resetting the writer,     * to make sure that no output is lost.</p>     *     * <p>This method is invoked automatically by the     * {@link #startDocument startDocument} method before writing     * a new document.</p>     *     * <p><strong>Note:</strong> this method will <em>not</em>     * clear the prefix or URI information in the writer or     * the selected output writer.</p>     *     * @see #flush     */    public void reset ()    {        openElement = false;        elementLevel = 0;        prefixCounter = 0;        nsSupport.reset();        inDTD = false;    }    /**     * Flush the output.     *     * <p>This method flushes the output stream.  It is especially useful     * when you need to make certain that the entire document has     * been written to output but do not want to close the output     * stream.</p>     *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆视频网站| 最新国产成人在线观看| 91小视频在线观看| 国产精品主播直播| 韩国三级电影一区二区| 麻豆国产精品777777在线| 日韩国产欧美三级| 美女免费视频一区二区| 男人操女人的视频在线观看欧美| 亚洲一区二区黄色| 日韩国产欧美在线播放| 亚洲午夜羞羞片| 亚洲动漫第一页| 亚洲一区在线视频观看| 亚洲一区二区影院| 丝袜亚洲精品中文字幕一区| 午夜欧美在线一二页| 日韩成人一级片| 蜜桃av噜噜一区二区三区小说| 蜜桃av噜噜一区二区三区小说| 麻豆国产一区二区| 成人午夜视频网站| 91麻豆.com| 欧美精品免费视频| 久久夜色精品国产欧美乱极品| 国产欧美日韩不卡| 亚洲视频狠狠干| 亚洲午夜精品在线| 国产一区二区三区四区五区入口| 国产成人一区在线| 欧美午夜影院一区| 欧美xxxx在线观看| 国产精品福利一区| 日本怡春院一区二区| 国产高清亚洲一区| 欧美在线一区二区| 精品国产一区二区在线观看| 国产精品国模大尺度视频| 亚洲免费观看高清完整| 日韩不卡一二三区| 春色校园综合激情亚洲| 欧美日韩精品三区| 欧美激情自拍偷拍| 肉丝袜脚交视频一区二区| 成人做爰69片免费看网站| 欧美日韩亚洲综合一区| 亚洲国产高清aⅴ视频| 婷婷久久综合九色综合绿巨人| 国产真实乱对白精彩久久| 色狠狠综合天天综合综合| 久久亚洲精精品中文字幕早川悠里| 1024国产精品| 国产一区二区三区在线观看免费| 在线国产电影不卡| 国产精品天美传媒| 激情国产一区二区| 欧美日韩国产大片| 日韩一区日韩二区| 国产福利一区二区三区视频| 欧美日韩亚洲不卡| 亚洲色图视频网| 风间由美一区二区av101| 日韩欧美在线网站| 成人小视频在线观看| 欧美一二三四区在线| 亚洲免费成人av| 99精品国产热久久91蜜凸| 国产午夜亚洲精品理论片色戒| 日本女人一区二区三区| 欧美调教femdomvk| 亚洲少妇屁股交4| aaa国产一区| 国产精品久久久久久亚洲毛片| 国产精品一品二品| 亚洲精品在线免费观看视频| 男男视频亚洲欧美| 欧美精品xxxxbbbb| 日韩激情中文字幕| 欧美一区中文字幕| 蜜桃视频一区二区三区| 777奇米四色成人影色区| 视频精品一区二区| 欧美精品 国产精品| 亚洲成人精品一区二区| 欧美高清一级片在线| 日韩国产欧美在线播放| 日韩一卡二卡三卡国产欧美| 久久99国产乱子伦精品免费| 欧美成人a∨高清免费观看| 久久国产精品99久久久久久老狼| 欧美一区二区成人6969| 狠狠久久亚洲欧美| 国产日韩欧美一区二区三区综合 | 日韩午夜激情视频| 免费观看久久久4p| 久久精品一区四区| 国产成人无遮挡在线视频| 亚洲国产精品高清| 91日韩精品一区| 午夜精品一区在线观看| 国产精品少妇自拍| 91美女在线观看| 午夜伦欧美伦电影理论片| 日韩精品一区二区在线| 国产成人欧美日韩在线电影| 亚洲日本电影在线| 欧美日韩国产不卡| 国产一区二区在线看| 亚洲码国产岛国毛片在线| 欧美一区二区三区婷婷月色| 高清不卡一区二区在线| 亚洲国产美国国产综合一区二区| 337p亚洲精品色噜噜狠狠| 国产露脸91国语对白| 亚洲黄一区二区三区| 在线综合亚洲欧美在线视频| 丁香激情综合五月| 日韩电影一区二区三区| 国产精品美女www爽爽爽| 欧美老年两性高潮| 国产成人h网站| 午夜伊人狠狠久久| 国产精品婷婷午夜在线观看| 欧美日韩视频第一区| 国产精品99久久久久久似苏梦涵| 亚洲欧美日韩一区二区| 欧美成人三级电影在线| 欧洲亚洲精品在线| 精品一区二区影视| 亚洲最色的网站| 国产精品三级视频| 欧美大片在线观看一区二区| 91热门视频在线观看| 丁香婷婷综合色啪| 蜜臀av性久久久久蜜臀aⅴ| 亚洲男人的天堂在线aⅴ视频| 日韩精品一区在线| 欧美日韩国产精品自在自线| jvid福利写真一区二区三区| 久久成人精品无人区| 午夜成人在线视频| 一区二区三区四区精品在线视频| 国产亚洲欧美色| 日韩精品中文字幕在线不卡尤物| 久久色在线视频| 欧美一区二区二区| 69堂成人精品免费视频| 欧洲一区在线电影| 日本电影欧美片| 色婷婷综合久久久中文字幕| 不卡av免费在线观看| 国产大陆a不卡| 国产乱码一区二区三区| 激情综合色播激情啊| 久久电影国产免费久久电影| 日韩精品成人一区二区在线| 亚洲成av人在线观看| 亚洲成人第一页| 视频在线观看一区| 日韩精品一区第一页| 亚洲国产一区二区视频| 亚洲第一二三四区| 日韩精品电影一区亚洲| 免费看欧美女人艹b| 美女诱惑一区二区| 国产一区二区三区视频在线播放| 卡一卡二国产精品| 国产一二三精品| 成人黄色综合网站| 色婷婷综合久久久久中文一区二区| 色诱视频网站一区| 欧美丰满嫩嫩电影| 日韩欧美一区在线| 国产日韩精品一区二区三区在线| 国产日韩三级在线| 一区二区三区蜜桃网| 亚洲成av人片一区二区| 久久99精品一区二区三区 | 日韩一区二区免费电影| 日韩欧美亚洲另类制服综合在线| 欧美精品一区二区在线观看| 国产日韩三级在线| 亚洲愉拍自拍另类高清精品| 日精品一区二区| 国产激情视频一区二区三区欧美| 99精品国产一区二区三区不卡| 欧美伊人久久大香线蕉综合69| 欧美一区二区三区视频免费 | 国产一本一道久久香蕉| 成人综合婷婷国产精品久久| 色av综合在线| 精品国产sm最大网站| 国产精品久久三区| 亚洲妇熟xx妇色黄| 成人一区二区三区中文字幕| 欧美性色aⅴ视频一区日韩精品| 欧美本精品男人aⅴ天堂| 亚洲色图一区二区| 国产在线麻豆精品观看| 91福利视频久久久久|