AI-generated Key Takeaways
-
This document lists the core interfaces, classes, and exceptions that comprise the SAX API for processing XML in Java.
-
Several legacy interfaces and classes (like
AttributeList
,DocumentHandler
,Parser
, andHandlerBase
) are now deprecated in favor of their SAX2 counterparts with Namespace support. -
Key interfaces like
XMLReader
,ContentHandler
, andAttributes
facilitate reading XML documents and handling their content and attributes. -
Error handling is managed through the
ErrorHandler
interface and specific exception types likeSAXException
andSAXParseException
. -
InputSource
facilitates specifying the source of an XML entity, while features likeLocator
andXMLFilter
add to SAX's processing capabilities.
Interfaces
AttributeList |
This interface is deprecated.
This interface has been replaced by the SAX2
Attributes
interface, which includes Namespace support. |
Attributes | Interface for a list of XML attributes. |
ContentHandler | Receive notification of the logical content of a document. |
DocumentHandler |
This interface is deprecated.
This interface has been replaced by the SAX2
ContentHandler
interface, which includes Namespace support. |
DTDHandler | Receive notification of basic DTD-related events. |
EntityResolver | Basic interface for resolving entities. |
ErrorHandler | Basic interface for SAX error handlers. |
Locator | Interface for associating a SAX event with a document location. |
Parser |
This interface is deprecated.
This interface has been replaced by the SAX2
XMLReader
interface, which includes Namespace support. |
XMLFilter | Interface for an XML filter. |
XMLReader | Interface for reading an XML document using callbacks. |
Classes
HandlerBase |
This class is deprecated.
This class works with the deprecated
DocumentHandler
interface. It has been replaced by the SAX2
DefaultHandler
class. |
InputSource | A single input source for an XML entity. |
Exceptions
SAXException | Encapsulate a general SAX error or warning. |
SAXNotRecognizedException | Exception class for an unrecognized identifier. |
SAXNotSupportedException | Exception class for an unsupported operation. |
SAXParseException | Encapsulate an XML parse error or warning. |