Class AbstractSAXConsumer

  • All Implemented Interfaces:
    ContentHandler, LexicalHandler

    @Deprecated(since="2022-01-27")
    public abstract class AbstractSAXConsumer
    extends Object
    implements ContentHandler, LexicalHandler
    Deprecated.
    This API is deprecated, migrate code to the XML APIs provided by the JDK.
    This abstract class provides default implementation of the methods specified by the ContentHandler and the LexicalHandler interface.
    • Constructor Detail

      • AbstractSAXConsumer

        public AbstractSAXConsumer()
        Deprecated.
    • Method Detail

      • setDocumentLocator

        public void setDocumentLocator​(Locator locator)
        Deprecated.
        Receive an object for locating the origin of SAX document events.
        Specified by:
        setDocumentLocator in interface ContentHandler
        Parameters:
        locator - An object that can return the location of any SAX document event.
      • startPrefixMapping

        public void startPrefixMapping​(String prefix,
                                       String uri)
                                throws SAXException
        Deprecated.
        Begin the scope of a prefix-URI Namespace mapping.
        Specified by:
        startPrefixMapping in interface ContentHandler
        Parameters:
        prefix - The Namespace prefix being declared.
        uri - The Namespace URI the prefix is mapped to.
        Throws:
        SAXException
      • startElement

        public void startElement​(String uri,
                                 String loc,
                                 String raw,
                                 Attributes a)
                          throws SAXException
        Deprecated.
        Receive notification of the beginning of an element.
        Specified by:
        startElement in interface ContentHandler
        Parameters:
        uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
        loc - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        raw - The raw XML 1.0 name (with prefix), or the empty string if raw names are not available.
        a - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.
        Throws:
        SAXException
      • endElement

        public void endElement​(String uri,
                               String loc,
                               String raw)
                        throws SAXException
        Deprecated.
        Receive notification of the end of an element.
        Specified by:
        endElement in interface ContentHandler
        Parameters:
        uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
        loc - The local name (without prefix), or the empty string if Namespace processing is not being performed.
        raw - The raw XML 1.0 name (with prefix), or the empty string if raw names are not available.
        Throws:
        SAXException
      • characters

        public void characters​(char[] ch,
                               int start,
                               int len)
                        throws SAXException
        Deprecated.
        Receive notification of character data.
        Specified by:
        characters in interface ContentHandler
        Parameters:
        ch - The characters from the XML document.
        start - The start position in the array.
        len - The number of characters to read from the array.
        Throws:
        SAXException
      • ignorableWhitespace

        public void ignorableWhitespace​(char[] ch,
                                        int start,
                                        int len)
                                 throws SAXException
        Deprecated.
        Receive notification of ignorable whitespace in element content.
        Specified by:
        ignorableWhitespace in interface ContentHandler
        Parameters:
        ch - The characters from the XML document.
        start - The start position in the array.
        len - The number of characters to read from the array.
        Throws:
        SAXException
      • processingInstruction

        public void processingInstruction​(String target,
                                          String data)
                                   throws SAXException
        Deprecated.
        Receive notification of a processing instruction.
        Specified by:
        processingInstruction in interface ContentHandler
        Parameters:
        target - The processing instruction target.
        data - The processing instruction data, or null if none was supplied.
        Throws:
        SAXException
      • skippedEntity

        public void skippedEntity​(String name)
                           throws SAXException
        Deprecated.
        Receive notification of a skipped entity.
        Specified by:
        skippedEntity in interface ContentHandler
        Parameters:
        name - The name of the skipped entity. If it is a parameter entity, the name will begin with '%'.
        Throws:
        SAXException
      • startDTD

        public void startDTD​(String name,
                             String publicId,
                             String systemId)
                      throws SAXException
        Deprecated.
        Report the start of DTD declarations, if any.
        Specified by:
        startDTD in interface LexicalHandler
        Parameters:
        name - The document type name.
        publicId - The declared public identifier for the external DTD subset, or null if none was declared.
        systemId - The declared system identifier for the external DTD subset, or null if none was declared.
        Throws:
        SAXException
      • startEntity

        public void startEntity​(String name)
                         throws SAXException
        Deprecated.
        Report the beginning of an entity.
        Specified by:
        startEntity in interface LexicalHandler
        Parameters:
        name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
        Throws:
        SAXException
      • comment

        public void comment​(char[] ch,
                            int start,
                            int len)
                     throws SAXException
        Deprecated.
        Report an XML comment anywhere in the document.
        Specified by:
        comment in interface LexicalHandler
        Parameters:
        ch - An array holding the characters in the comment.
        start - The starting position in the array.
        len - The number of characters to use from the array.
        Throws:
        SAXException