# DefaultHandler2

public class **DefaultHandler2** extends [DefaultHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html)  
implements [LexicalHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html) [DeclHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html) [EntityResolver2](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/EntityResolver2.html) This class extends the SAX2 base handler class to support the
SAX2 `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html`, `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html`, and
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/EntityResolver2.html` extensions. Except for overriding the
original SAX1 `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String)`
method the added handler methods just return. Subclassers may
override everything on a method-by-method basis.

> *This module, both source code and documentation, is in the
> Public Domain, and comes with **NO WARRANTY**.*

*Note:* this class might yet learn that the
*ContentHandler.setDocumentLocator()* call might be passed a
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2.html` object, and that the
*ContentHandler.startElement()* call might be passed a
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Attributes2.html` object.

### Public Constructor Summary

|---|---|
|   | [DefaultHandler2](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#DefaultHandler2())() Constructs a handler which ignores all parsing events. |

### Public Method Summary

|---|---|
| void | [attributeDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#attributeDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) eName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) aName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) type, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) mode, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) value) Report an attribute type declaration. |
| void | [comment](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#comment(char[],%20int,%20int))(char\[\] ch, int start, int length) Report an XML comment anywhere in the document. |
| void | [elementDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#elementDecl(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) model) Report an element type declaration. |
| void | [endCDATA](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#endCDATA())() Report the end of a CDATA section. |
| void | [endDTD](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#endDTD())() Report the end of DTD declarations. |
| void | [endEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#endEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Report the end of an entity. |
| void | [externalEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#externalEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Report a parsed external entity declaration. |
| [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [getExternalSubset](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#getExternalSubset(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) baseURI) Tells the parser that if no external subset has been declared in the document text, none should be used. |
| void | [internalEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#internalEntityDecl(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) value) Report an internal entity declaration. |
| [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [resolveEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#resolveEntity(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Invokes `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/EntityResolver.html#resolveEntity(java.lang.String,%20java.lang.String)` with null entity name and base URI. |
| [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [resolveEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#resolveEntity(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) baseURI, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI. |
| void | [startCDATA](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#startCDATA())() Report the start of a CDATA section. |
| void | [startDTD](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#startDTD(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Report the start of DTD declarations, if any. |
| void | [startEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DefaultHandler2.html#startEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Report the beginning of some internal and external XML entities. |

### Inherited Method Summary

From class [org.xml.sax.helpers.DefaultHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html)

|---|---|
| void | [characters](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#characters(char[],%20int,%20int))(char\[\] ch, int start, int length) Receive notification of character data inside an element. |
| void | [endDocument](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#endDocument())() Receive notification of the end of the document. |
| void | [endElement](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) localName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) qName) Receive notification of the end of an element. |
| void | [endPrefixMapping](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#endPrefixMapping(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) prefix) Receive notification of the end of a Namespace mapping. |
| void | [error](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#error(org.xml.sax.SAXParseException))([SAXParseException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXParseException.html) e) Receive notification of a recoverable parser error. |
| void | [fatalError](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#fatalError(org.xml.sax.SAXParseException))([SAXParseException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXParseException.html) e) Report a fatal XML parsing error. |
| void | [ignorableWhitespace](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#ignorableWhitespace(char[],%20int,%20int))(char\[\] ch, int start, int length) Receive notification of ignorable whitespace in element content. |
| void | [notationDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#notationDecl(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Receive notification of a notation declaration. |
| void | [processingInstruction](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#processingInstruction(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) target, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) data) Receive notification of a processing instruction. |
| [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [resolveEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Resolve an external entity. |
| void | [setDocumentLocator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#setDocumentLocator(org.xml.sax.Locator))([Locator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html) locator) Receive a Locator object for document events. |
| void | [skippedEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#skippedEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Receive notification of a skipped entity. |
| void | [startDocument](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#startDocument())() Receive notification of the beginning of the document. |
| void | [startElement](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) localName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) qName, [Attributes](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Attributes.html) attributes) Receive notification of the start of an element. |
| void | [startPrefixMapping](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#startPrefixMapping(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) prefix, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri) Receive notification of the start of a Namespace mapping. |
| void | [unparsedEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#unparsedEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) notationName) Receive notification of an unparsed entity declaration. |
| void | [warning](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#warning(org.xml.sax.SAXParseException))([SAXParseException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXParseException.html) e) Receive notification of a parser warning. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

From interface [org.xml.sax.EntityResolver](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/EntityResolver.html)

|---|---|
| abstract [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [resolveEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/EntityResolver.html#resolveEntity(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Allow the application to resolve external entities. |

From interface [org.xml.sax.DTDHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html)

|---|---|
| abstract void | [notationDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html#notationDecl(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Receive notification of a notation declaration event. |
| abstract void | [unparsedEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html#unparsedEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) notationName) Receive notification of an unparsed entity declaration event. |

From interface [org.xml.sax.ContentHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html)

|---|---|
| abstract void | [characters](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int))(char\[\] ch, int start, int length) Receive notification of character data. |
| abstract void | [endDocument](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#endDocument())() Receive notification of the end of a document. |
| abstract void | [endElement](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) localName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) qName) Receive notification of the end of an element. |
| abstract void | [endPrefixMapping](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#endPrefixMapping(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) prefix) End the scope of a prefix-URI mapping. |
| abstract void | [ignorableWhitespace](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#ignorableWhitespace(char[],%20int,%20int))(char\[\] ch, int start, int length) Receive notification of ignorable whitespace in element content. |
| abstract void | [processingInstruction](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#processingInstruction(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) target, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) data) Receive notification of a processing instruction. |
| abstract void | [setDocumentLocator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#setDocumentLocator(org.xml.sax.Locator))([Locator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html) locator) Receive an object for locating the origin of SAX document events. |
| abstract void | [skippedEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Receive notification of a skipped entity. |
| abstract void | [startDocument](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startDocument())() Receive notification of the beginning of a document. |
| abstract void | [startElement](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) localName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) qName, [Attributes](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Attributes.html) atts) Receive notification of the beginning of an element. |
| abstract void | [startPrefixMapping](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startPrefixMapping(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) prefix, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) uri) Begin the scope of a prefix-URI Namespace mapping. |

From interface [org.xml.sax.ErrorHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ErrorHandler.html)

|---|---|
| abstract void | [error](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ErrorHandler.html#error(org.xml.sax.SAXParseException))([SAXParseException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXParseException.html) exception) Receive notification of a recoverable error. |
| abstract void | [fatalError](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ErrorHandler.html#fatalError(org.xml.sax.SAXParseException))([SAXParseException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXParseException.html) exception) Receive notification of a non-recoverable error. |
| abstract void | [warning](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ErrorHandler.html#warning(org.xml.sax.SAXParseException))([SAXParseException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXParseException.html) exception) Receive notification of a warning. |

From interface [org.xml.sax.ext.LexicalHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html)

|---|---|
| abstract void | [comment](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#comment(char[],%20int,%20int))(char\[\] ch, int start, int length) Report an XML comment anywhere in the document. |
| abstract void | [endCDATA](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endCDATA())() Report the end of a CDATA section. |
| abstract void | [endDTD](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endDTD())() Report the end of DTD declarations. |
| abstract void | [endEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Report the end of an entity. |
| abstract void | [startCDATA](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startCDATA())() Report the start of a CDATA section. |
| abstract void | [startDTD](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startDTD(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Report the start of DTD declarations, if any. |
| abstract void | [startEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startEntity(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Report the beginning of some internal and external XML entities. |

From interface [org.xml.sax.ext.DeclHandler](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html)

|---|---|
| abstract void | [attributeDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html#attributeDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) eName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) aName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) type, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) mode, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) value) Report an attribute type declaration. |
| abstract void | [elementDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html#elementDecl(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) model) Report an element type declaration. |
| abstract void | [externalEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html#externalEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Report a parsed external entity declaration. |
| abstract void | [internalEntityDecl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html#internalEntityDecl(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) value) Report an internal entity declaration. |

From interface [org.xml.sax.ext.EntityResolver2](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/EntityResolver2.html)

|---|---|
| abstract [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [getExternalSubset](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/EntityResolver2.html#getExternalSubset(java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) baseURI) Allows applications to provide an external subset for documents that don't explicitly define one. |
| abstract [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html) | [resolveEntity](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/EntityResolver2.html#resolveEntity(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) baseURI, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Allows applications to map references to external entities into input sources, or tell the parser it should use conventional URI resolution. |

## Public Constructors

#### public
**DefaultHandler2**
()

Constructs a handler which ignores all parsing events.

## Public Methods

#### public void
**attributeDecl**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) eName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) aName, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) type, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) mode, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) value)

Report an attribute type declaration.

Only the effective (first) declaration for an attribute will
be reported. The type will be one of the strings "CDATA",
"ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY",
"ENTITIES", a parenthesized token group with
the separator "\|" and all whitespace removed, or the word
"NOTATION" followed by a space followed by a parenthesized
token group with all whitespace removed.

The value will be the value as reported to applications,
appropriately normalized and with entity and character
references expanded.

<br />

##### Parameters

| eName | The name of the associated element. |
| aName | The name of the attribute. |
| type | A string representing the attribute type. |
| mode | A string representing the attribute defaulting mode ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies. |
| value | A string representing the attribute's default value, or null if there is none. |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**comment**
(char\[\] ch, int start, int length)

Report an XML comment anywhere in the document.

This callback will be used for comments inside or outside the
document element, including comments in the external DTD
subset (if read). Comments in the DTD must be properly
nested inside start/endDTD and start/endEntity events (if
used).

<br />

##### Parameters

| ch | An array holding the characters in the comment. |
| start | The starting position in the array. |
| length | The number of characters to use from the array. |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**elementDecl**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) model)

Report an element type declaration.

The content model will consist of the string "EMPTY", the
string "ANY", or a parenthesised group, optionally followed
by an occurrence indicator. The model will be normalized so
that all parameter entities are fully resolved and all whitespace
is removed,and will include the enclosing parentheses. Other
normalization (such as removing redundant parentheses or
simplifying occurrence indicators) is at the discretion of the
parser.

<br />

##### Parameters

| name | The element type name. |
| model | The content model as a normalized string. |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**endCDATA**
()

Report the end of a CDATA section.

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**endDTD**
()

Report the end of DTD declarations.

This method is intended to report the end of the
DOCTYPE declaration; if the document has no DOCTYPE declaration,
this method will not be invoked.

<br />

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**endEntity**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name)

Report the end of an entity.

##### Parameters

| name | The name of the entity that is ending. |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**externalEntityDecl**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

Report a parsed external entity declaration.

Only the effective (first) declaration for each entity
will be reported.

If the system identifier is a URL, the parser must resolve it
fully before passing it to the application.

<br />

##### Parameters

| name | The name of the entity. If it is a parameter entity, the name will begin with '%'. |
| publicId | The entity's public identifier, or null if none was given. |
| systemId | The entity's system identifier. |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html)
**getExternalSubset**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) baseURI)

Tells the parser that if no external subset has been declared
in the document text, none should be used.

##### Parameters

| name | Identifies the document root element. This name comes from a DOCTYPE declaration (where available) or from the actual root element. The parameter is ignored. |
| baseURI | The document's base URI, serving as an additional hint for selecting the external subset. This is always an absolute URI, unless it is null because the XMLReader was given an InputSource without one. The parameter is ignored. |
|---|---|

##### Returns

- null (always).

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) | Any SAX exception, possibly wrapping another exception. |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | Probably indicating a failure to create a new InputStream or Reader, or an illegal URL. |
|---|---|

#### public void
**internalEntityDecl**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) value)

Report an internal entity declaration.

Only the effective (first) declaration for each entity
will be reported. All parameter entities in the value
will be expanded, but general entities will not.

<br />

##### Parameters

| name | The name of the entity. If it is a parameter entity, the name will begin with '%'. |
| value | The replacement text of the entity. |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html)
**resolveEntity**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

Invokes
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/EntityResolver.html#resolveEntity(java.lang.String,%20java.lang.String)`
with null entity name and base URI.
You only need to override that method to use this class.

##### Parameters

| publicId | The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied. |
| systemId | The system identifier of the external entity being referenced; either a relative or absolute URI. This is never null when invoked by a SAX2 parser; only declared entities, and any external subset, are resolved by such parsers. |
|---|---|

##### Returns

- An InputSource object describing the new input source.

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) | Any SAX exception, possibly wrapping another exception. |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | Probably indicating a failure to create a new InputStream or Reader, or an illegal URL. |
|---|---|

#### public [InputSource](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/InputSource.html)
**resolveEntity**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) baseURI, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

Tells the parser to resolve the systemId against the baseURI
and read the entity text from that resulting absolute URI.
Note that because the older
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/DefaultHandler.html#resolveEntity(java.lang.String,%20java.lang.String)`,
method is overridden to call this one, this method may sometimes
be invoked with null *name* and *baseURI* , and
with the *systemId* already absolutized.

##### Parameters

| name | Identifies the external entity being resolved. Either "\[dtd\]" for the external subset, or a name starting with "%" to indicate a parameter entity, or else the name of a general entity. This is never null when invoked by a SAX2 parser. |
| publicId | The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied. |
| baseURI | The URI with respect to which relative systemIDs are interpreted. This is always an absolute URI, unless it is null (likely because the XMLReader was given an InputSource without one). This URI is defined by the XML specification to be the one associated with the "\<" starting the relevant declaration. |
| systemId | The system identifier of the external entity being referenced; either a relative or absolute URI. This is never null when invoked by a SAX2 parser; only declared entities, and any external subset, are resolved by such parsers. |
|---|---|

##### Returns

- An InputSource object describing the new input source.

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) | Any SAX exception, possibly wrapping another exception. |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | Probably indicating a failure to create a new InputStream or Reader, or an illegal URL. |
|---|---|

#### public void
**startCDATA**
()

Report the start of a CDATA section.

The contents of the CDATA section will be reported through
the regular `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int)` event; this event is intended only to report
the boundary.

<br />

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**startDTD**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId)

Report the start of DTD declarations, if any.

This method is intended to report the beginning of the
DOCTYPE declaration; if the document has no DOCTYPE declaration,
this method will not be invoked.

All declarations reported through
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html` or
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html` events must appear
between the startDTD and `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endDTD()` events.
Declarations are assumed to belong to the internal DTD subset
unless they appear between `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#startEntity(java.lang.String)`
and `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/LexicalHandler.html#endEntity(java.lang.String)` events. Comments and
processing instructions from the DTD should also be reported
between the startDTD and endDTD events, in their original
order of (logical) occurrence; they are not required to
appear in their correct locations relative to DTDHandler
or DeclHandler events, however.

Note that the start/endDTD events will appear within
the start/endDocument events from ContentHandler and
before the first
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)`
event.

<br />

##### 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. (Note that this is not resolved against the document base URI.) |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|

#### public void
**startEntity**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name)

Report the beginning of some internal and external XML entities.

The reporting of parameter entities (including
the external DTD subset) is optional, and SAX2 drivers that
report LexicalHandler events may not implement it; you can use the
`http://xml.org/sax/features/lexical-handler/parameter-entities`
feature to query or control the reporting of parameter entities.

General entities are reported with their regular names,
parameter entities have '%' prepended to their names, and
the external DTD subset has the pseudo-entity name "\[dtd\]".

When a SAX2 driver is providing these events, all other
events must be properly nested within start/end entity
events. There is no additional requirement that events from
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/DeclHandler.html` or
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/DTDHandler.html` be properly ordered.

Note that skipped entities will be reported through the
`https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String)`
event, which is part of the ContentHandler interface.

Because of the streaming event model that SAX uses, some
entity boundaries cannot be reported under any
circumstances:

- general entities within attribute values
- parameter entities within declarations

These will be silently expanded, with no indication of where
the original entity boundaries were.

Note also that the boundaries of character references (which
are not really entities anyway) are not reported.

All start/endEntity events must be properly nested.

##### Parameters

| 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\]". |
|---|---|

##### Throws

| [SAXException](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/SAXException.html) |   |
|---|---|