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

📄 xmlreaderbase.java

📁 openlogic-jdom-1.1-all-src-1.zip 可以用于操作xml文件
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
     *     * @param locator The document locator.     * @see org.xml.sax.ContentHandler#setDocumentLocator     */    public void setDocumentLocator (Locator locator)    {        this.locator = locator;        if (contentHandler != null) {            contentHandler.setDocumentLocator(locator);        }    }            /**     * Send start of document.     *     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#startDocument     */    public void startDocument ()    throws SAXException    {        if (contentHandler != null) {            contentHandler.startDocument();        }    }            /**     * Send end of document.     *     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#endDocument     */    public void endDocument ()    throws SAXException    {        if (contentHandler != null) {            contentHandler.endDocument();        }    }            /**     * Sends start of namespace prefix mapping.     *     * @param prefix The Namespace prefix.     * @param uri The Namespace URI.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#startPrefixMapping     */    public void startPrefixMapping (String prefix, String uri)    throws SAXException    {        if (contentHandler != null) {            contentHandler.startPrefixMapping(prefix, uri);        }    }            /**     * Sends end of namespace prefix mapping.     *     * @param prefix The Namespace prefix.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#endPrefixMapping     */    public void endPrefixMapping (String prefix)    throws SAXException    {        if (contentHandler != null) {            contentHandler.endPrefixMapping(prefix);        }    }            /**     * Sends start of element.     *     * @param uri The element's Namespace URI, or the empty string.     * @param localName The element's local name, or the empty string.     * @param qName The element's qualified (prefixed) name, or the empty     *        string.     * @param atts The element's attributes.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#startElement     */    public void startElement (String uri, String localName, String qName,    Attributes atts)    throws SAXException    {        if (contentHandler != null) {            contentHandler.startElement(uri, localName, qName, atts);        }    }            /**     * Sends end of element.     *     * @param uri The element's Namespace URI, or the empty string.     * @param localName The element's local name, or the empty string.     * @param qName The element's qualified (prefixed) name, or the empty     *        string.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#endElement     */    public void endElement (String uri, String localName, String qName)    throws SAXException    {        if (contentHandler != null) {            contentHandler.endElement(uri, localName, qName);        }    }            /**     * Sends character data.     *     * @param ch An array of characters.     * @param start The starting position in the array.     * @param length The number of characters to use from the array.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#characters     */    public void characters (char ch[], int start, int length)    throws SAXException    {        if (contentHandler != null) {            contentHandler.characters(ch, start, length);        }    }            /**     * Sends ignorable whitespace.     *     * @param ch An array of characters.     * @param start The starting position in the array.     * @param length The number of characters to use from the array.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#ignorableWhitespace     */    public void ignorableWhitespace (char ch[], int start, int length)    throws SAXException    {        if (contentHandler != null) {            contentHandler.ignorableWhitespace(ch, start, length);        }    }            /**     * Sends processing instruction.     *     * @param target The processing instruction target.     * @param data The text following the target.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#processingInstruction     */    public void processingInstruction (String target, String data)    throws SAXException    {        if (contentHandler != null) {            contentHandler.processingInstruction(target, data);        }    }            /**     * Sends skipped entity.     *     * @param name The name of the skipped entity.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ContentHandler#skippedEntity     */    public void skippedEntity (String name)    throws SAXException    {        if (contentHandler != null) {            contentHandler.skippedEntity(name);        }    }                ////////////////////////////////////////////////////////////////////    // Implementation of org.xml.sax.ErrorHandler.    ////////////////////////////////////////////////////////////////////            /**     * Sends warning.     *     * @param e The nwarning as an exception.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ErrorHandler#warning     */    public void warning (SAXParseException e)    throws SAXException    {        if (errorHandler != null) {            errorHandler.warning(e);        }    }            /**     * Sends error.     *     * @param e The error as an exception.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ErrorHandler#error     */    public void error (SAXParseException e)    throws SAXException    {        if (errorHandler != null) {            errorHandler.error(e);        }    }            /**     * Sends fatal error.     *     * @param e The error as an exception.     * @exception org.xml.sax.SAXException The client may throw     *            an exception during processing.     * @see org.xml.sax.ErrorHandler#fatalError     */    public void fatalError (SAXParseException e)    throws SAXException    {        if (errorHandler != null) {            errorHandler.fatalError(e);        }    }                ////////////////////////////////////////////////////////////////////    // Implementation of org.xml.sax.ext.LexicalHandler.    ////////////////////////////////////////////////////////////////////    /**     * Sends start of DTD.     *     * @param name The document type name.     * @param publicId The declared public identifier for the     *        external DTD subset, or null if none was declared.     * @param systemId The declared system identifier for the     *        external DTD subset, or null if none was declared.     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#startDTD     */    public void startDTD(String name, String publicId, String systemId)    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.startDTD(name, publicId, systemId);        }    }    /**     * Sends end of DTD.     *     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#endDTD     */    public void endDTD()    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.endDTD();        }    }        /*     * Sends start of entity.     *     * @param name The name of the entity.  If it is a parameter     *        entity, the name will begin with '%', and if it is the     *        external DTD subset, it will be "[dtd]".     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#startEntity     */    public void startEntity(String name)    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.startEntity(name);        }    }    /*     * Sends end of entity.     *     * @param name The name of the entity that is ending.     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#endEntity     */    public void endEntity(String name)    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.endEntity(name);        }    }    /*     * Sends start of CDATA.     *     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#startCDATA     */    public void startCDATA()    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.startCDATA();        }    }        /*     * Sends end of CDATA.     *     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#endCDATA     */    public void endCDATA()    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.endCDATA();        }    }    /*     * Sends comment.     *     * @param ch An array holding the characters in the comment.     * @param start The starting position in the array.     * @param length The number of characters to use from the array.     * @exception org.xml.sax.SAXException If a filter     *            further down the chain raises an exception.     * @see org.xml.sax.ext.LexicalHandler#comment     */    public void comment(char[] ch, int start, int length)    throws SAXException {        if (lexicalHandler != null) {            lexicalHandler.comment(ch, start, length);        }    }    ////////////////////////////////////////////////////////////////////    // Internal state.    ////////////////////////////////////////////////////////////////////    private Locator locator = null;    private EntityResolver entityResolver = null;    private DTDHandler dtdHandler = null;    private ContentHandler contentHandler = null;    private ErrorHandler errorHandler = null;    private LexicalHandler lexicalHandler = null;    ////////////////////////////////////////////////////////////////////    // Constants.    ////////////////////////////////////////////////////////////////////    protected static final Attributes EMPTY_ATTS = new AttributesImpl();    protected static final String[] LEXICAL_HANDLER_NAMES = {        "http://xml.org/sax/properties/lexical-handler",        "http://xml.org/sax/handlers/LexicalHandler"    };}// end of XMLReaderBase.java

⌨️ 快捷键说明

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