⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlfilterbase.java

📁 一套会员管理系统组件
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     * End an element without a Namespace URI or qname.
     *
     * <p>This method will supply an empty string for the qName
     * and an empty string for the Namespace URI.
     * It invokes {@link #endElement(String, String, String)}
     * directly.</p>
     *
     * @param localName The element's local name.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
     * @see com.membersoftware.sax.ContentHandler#endElement
     */
    public void endElement (String localName) throws SAXException
    {
        endElement("", localName, "");
    }

    /**
     * Add an empty element.
     *
     * Both a {@link #startElement startElement} and an
     * {@link #endElement endElement} event will be passed on down
     * the filter chain.
     *
     * @param uri The element's Namespace URI, or the empty string
     *        if the element has no Namespace or if Namespace
     *        processing is not being performed.
     * @param localName The element's local name (without prefix).  This
     *        parameter must be provided.
     * @param qName The element's qualified name (with prefix), or
     *        the empty string if none is available.  This parameter
     *        is strictly advisory: the writer may or may not use
     *        the prefix attached.
     * @param atts The element's attribute list.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
     * @see com.membersoftware.sax.ContentHandler#startElement
     * @see com.membersoftware.sax.ContentHandler#endElement
     */
    public void emptyElement (String uri, String localName, String qName,
            Attributes atts) throws SAXException
    {
        startElement(uri, localName, qName, atts);
        endElement(uri, localName, qName);
    }

     /**
      * Add an empty element without a qname or attributes.
      *
      * <p>This method will supply an empty string for the qname
      * and an empty attribute list.  It invokes
      * {@link #emptyElement(String, String, String, Attributes)}
      * directly.</p>
      *
      * @param uri The element's Namespace URI.
      * @param localName The element's local name.
      * @exception com.membersoftware.sax.SAXException If a filter
      *            further down the chain raises an exception.
      * @see #emptyElement(String, String, String, Attributes)
      */
    public void emptyElement (String uri, String localName) throws SAXException
    {
        emptyElement(uri, localName, "", EMPTY_ATTS);
    }

    /**
     * Add an empty element without a Namespace URI, qname or attributes.
     *
     * <p>This method will supply an empty string for the qname,
     * and empty string for the Namespace URI, and an empty
     * attribute list.  It invokes
     * {@link #emptyElement(String, String, String, Attributes)}
     * directly.</p>
     *
     * @param localName The element's local name.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
      * @see #emptyElement(String, String, String, Attributes)
     */
    public void emptyElement (String localName) throws SAXException
    {
        emptyElement("", localName, "", EMPTY_ATTS);
    }

    /**
     * Add an element with character data content.
     *
     * <p>This is a convenience method to add a complete element
     * with character data content, including the start tag
     * and end tag.</p>
     *
     * <p>This method invokes
     * {@link @see com.membersoftware.sax.ContentHandler#startElement},
     * followed by
     * {@link #characters(String)}, followed by
     * {@link @see com.membersoftware.sax.ContentHandler#endElement}.</p>
     *
     * @param uri The element's Namespace URI.
     * @param localName The element's local name.
     * @param qName The element's default qualified name.
     * @param atts The element's attributes.
     * @param content The character data content.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
     * @see com.membersoftware.sax.ContentHandler#startElement
     * @see #characters(String)
     * @see com.membersoftware.sax.ContentHandler#endElement
     */
    public void dataElement (String uri, String localName, String qName,
            Attributes atts, String content) throws SAXException
    {
        startElement(uri, localName, qName, atts);
        characters(content);
        endElement(uri, localName, qName);
    }

    /**
     * Add an element with character data content but no attributes.
     *
     * <p>This is a convenience method to add a complete element
     * with character data content, including the start tag
     * and end tag.  This method provides an empty string
     * for the qname and an empty attribute list.</p>
     *
     * <p>This method invokes
     * {@link @see com.membersoftware.sax.ContentHandler#startElement},
     * followed by
     * {@link #characters(String)}, followed by
     * {@link @see com.membersoftware.sax.ContentHandler#endElement}.</p>
     *
     * @param uri The element's Namespace URI.
     * @param localName The element's local name.
     * @param content The character data content.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
     * @see com.membersoftware.sax.ContentHandler#startElement
     * @see #characters(String)
     * @see com.membersoftware.sax.ContentHandler#endElement
     */
    public void dataElement (String uri, String localName, String content)
            throws SAXException
    {
        dataElement(uri, localName, "", EMPTY_ATTS, content);
    }

    /**
     * Add an element with character data content but no attributes or
     * Namespace URI.
     *
     * <p>This is a convenience method to add a complete element
     * with character data content, including the start tag
     * and end tag.  The method provides an empty string for the
     * Namespace URI, and empty string for the qualified name,
     * and an empty attribute list.</p>
     *
     * <p>This method invokes
     * {@link @see com.membersoftware.sax.ContentHandler#startElement},
     * followed by
     * {@link #characters(String)}, followed by
     * {@link @see com.membersoftware.sax.ContentHandler#endElement}.</p>
     *
     * @param localName The element's local name.
     * @param content The character data content.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
     * @see com.membersoftware.sax.ContentHandler#startElement
     * @see #characters(String)
     * @see com.membersoftware.sax.ContentHandler#endElement
     */
    public void dataElement (String localName, String content)
            throws SAXException
    {
        dataElement("", localName, "", EMPTY_ATTS, content);
    }

    /**
     * Add a string of character data, with XML escaping.
     *
     * <p>This is a convenience method that takes an XML
     * String, converts it to a character array, then invokes
     * {@link @see com.membersoftware.sax.ContentHandler#characters}.</p>
     *
     * @param data The character data.
     * @exception com.membersoftware.sax.SAXException If a filter
     *            further down the chain raises an exception.
     * @see @see com.membersoftware.sax.ContentHandler#characters
     */
    public void characters (String data) throws SAXException
    {
        char ch[] = data.toCharArray();
        characters(ch, 0, ch.length);
    }

    ////////////////////////////////////////////////////////////////////
    // Constants.
    ////////////////////////////////////////////////////////////////////
    protected static final Attributes EMPTY_ATTS = new AttributesImpl();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -