Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/org/xml/sax/ext/DefaultHandler2#pubctors) \| [Methods](https://developer.android.com/reference/org/xml/sax/ext/DefaultHandler2#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/org/xml/sax/ext/DefaultHandler2#inhmethods)

# DefaultHandler2


`
public


class
DefaultHandler2
`


`


`

`

extends https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler


`

`


implements

https://developer.android.com/reference/org/xml/sax/ext/DeclHandler,

https://developer.android.com/reference/org/xml/sax/ext/EntityResolver2,

https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [org.xml.sax.helpers.DefaultHandler](https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler) ||
|   | ↳ | org.xml.sax.ext.DefaultHandler2 |

<br />

*** ** * ** ***

This class extends the SAX2 base handler class to support the
SAX2 `https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler`, `https://developer.android.com/reference/org/xml/sax/ext/DeclHandler`, and
`https://developer.android.com/reference/org/xml/sax/ext/EntityResolver2` extensions. Except for overriding the
original SAX1 `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#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://developer.android.com/reference/org/xml/sax/ext/Locator2` object, and that the
*ContentHandler.startElement()* call might be passed a
`https://developer.android.com/reference/org/xml/sax/ext/Attributes2` object.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/org/xml/sax/ext/DefaultHandler2#DefaultHandler2()() ` Constructs a handler which ignores all parsing events. |

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

### Inherited methods

From class `

https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler

` `


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#characters(char[],%20int,%20int)(char[] ch, int start, int length)
`

Receive notification of character data inside an element.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#endDocument()()
`

Receive notification of the end of the document.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#endElement(java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String uri, https://developer.android.com/reference/java/lang/String localName, https://developer.android.com/reference/java/lang/String qName)
`

Receive notification of the end of an element.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#endPrefixMapping(java.lang.String)(https://developer.android.com/reference/java/lang/String prefix)
`

Receive notification of the end of a Namespace mapping.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#error(org.xml.sax.SAXParseException)(https://developer.android.com/reference/org/xml/sax/SAXParseException e)
`

Receive notification of a recoverable parser error.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#fatalError(org.xml.sax.SAXParseException)(https://developer.android.com/reference/org/xml/sax/SAXParseException e)
`

Report a fatal XML parsing error.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#ignorableWhitespace(char[],%20int,%20int)(char[] ch, int start, int length)
`

Receive notification of ignorable whitespace in element content.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#notationDecl(java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId)
`

Receive notification of a notation declaration.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#processingInstruction(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String target, https://developer.android.com/reference/java/lang/String data)
`

Receive notification of a processing instruction.


`


https://developer.android.com/reference/org/xml/sax/InputSource` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#resolveEntity(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId)
`

Resolve an external entity.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#setDocumentLocator(org.xml.sax.Locator)(https://developer.android.com/reference/org/xml/sax/Locator locator)
`

Receive a Locator object for document events.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#skippedEntity(java.lang.String)(https://developer.android.com/reference/java/lang/String name)
`

Receive notification of a skipped entity.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#startDocument()()
`

Receive notification of the beginning of the document.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)(https://developer.android.com/reference/java/lang/String uri, https://developer.android.com/reference/java/lang/String localName, https://developer.android.com/reference/java/lang/String qName, https://developer.android.com/reference/org/xml/sax/Attributes attributes)
`

Receive notification of the start of an element.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#startPrefixMapping(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String prefix, https://developer.android.com/reference/java/lang/String uri)
`

Receive notification of the start of a Namespace mapping.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#unparsedEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId, https://developer.android.com/reference/java/lang/String notationName)
`

Receive notification of an unparsed entity declaration.


`


void` `
https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#warning(org.xml.sax.SAXParseException)(https://developer.android.com/reference/org/xml/sax/SAXParseException e)
`

Receive notification of a parser warning.


From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/org/xml/sax/ContentHandler

` `
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#characters(char[],%20int,%20int)(char[] ch, int start, int length)
`

Receive notification of character data.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#endDocument()()
`

Receive notification of the end of a document.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#endElement(java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String uri, https://developer.android.com/reference/java/lang/String localName, https://developer.android.com/reference/java/lang/String qName)
`

Receive notification of the end of an element.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#endPrefixMapping(java.lang.String)(https://developer.android.com/reference/java/lang/String prefix)
`

End the scope of a prefix-URI mapping.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#ignorableWhitespace(char[],%20int,%20int)(char[] ch, int start, int length)
`

Receive notification of ignorable whitespace in element content.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#processingInstruction(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String target, https://developer.android.com/reference/java/lang/String data)
`

Receive notification of a processing instruction.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#setDocumentLocator(org.xml.sax.Locator)(https://developer.android.com/reference/org/xml/sax/Locator locator)
`

Receive an object for locating the origin of SAX document events.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#skippedEntity(java.lang.String)(https://developer.android.com/reference/java/lang/String name)
`

Receive notification of a skipped entity.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#startDocument()()
`

Receive notification of the beginning of a document.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)(https://developer.android.com/reference/java/lang/String uri, https://developer.android.com/reference/java/lang/String localName, https://developer.android.com/reference/java/lang/String qName, https://developer.android.com/reference/org/xml/sax/Attributes atts)
`

Receive notification of the beginning of an element.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ContentHandler#startPrefixMapping(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String prefix, https://developer.android.com/reference/java/lang/String uri)
`

Begin the scope of a prefix-URI Namespace mapping.


From interface `

https://developer.android.com/reference/org/xml/sax/DTDHandler

` `
abstract


void` `
https://developer.android.com/reference/org/xml/sax/DTDHandler#notationDecl(java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId)
`

Receive notification of a notation declaration event.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/DTDHandler#unparsedEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId, https://developer.android.com/reference/java/lang/String notationName)
`

Receive notification of an unparsed entity declaration event.


From interface `

https://developer.android.com/reference/org/xml/sax/EntityResolver

` `
abstract


https://developer.android.com/reference/org/xml/sax/InputSource` `
https://developer.android.com/reference/org/xml/sax/EntityResolver#resolveEntity(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId)
`

Allow the application to resolve external entities.


From interface `

https://developer.android.com/reference/org/xml/sax/ErrorHandler

` `
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ErrorHandler#error(org.xml.sax.SAXParseException)(https://developer.android.com/reference/org/xml/sax/SAXParseException exception)
`

Receive notification of a recoverable error.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ErrorHandler#fatalError(org.xml.sax.SAXParseException)(https://developer.android.com/reference/org/xml/sax/SAXParseException exception)
`

Receive notification of a non-recoverable error.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ErrorHandler#warning(org.xml.sax.SAXParseException)(https://developer.android.com/reference/org/xml/sax/SAXParseException exception)
`

Receive notification of a warning.


From interface `

https://developer.android.com/reference/org/xml/sax/ext/DeclHandler

` `
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/DeclHandler#attributeDecl(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String eName, https://developer.android.com/reference/java/lang/String aName, https://developer.android.com/reference/java/lang/String type, https://developer.android.com/reference/java/lang/String mode, https://developer.android.com/reference/java/lang/String value)
`

Report an attribute type declaration.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/DeclHandler#elementDecl(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String model)
`

Report an element type declaration.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/DeclHandler#externalEntityDecl(java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId)
`

Report a parsed external entity declaration.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/DeclHandler#internalEntityDecl(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String value)
`

Report an internal entity declaration.


From interface `

https://developer.android.com/reference/org/xml/sax/ext/EntityResolver2

` `
abstract


https://developer.android.com/reference/org/xml/sax/InputSource` `
https://developer.android.com/reference/org/xml/sax/ext/EntityResolver2#getExternalSubset(java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String baseURI)
`

Allows applications to provide an external subset for documents
that don't explicitly define one.


`
abstract


https://developer.android.com/reference/org/xml/sax/InputSource` `
https://developer.android.com/reference/org/xml/sax/ext/EntityResolver2#resolveEntity(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String baseURI, https://developer.android.com/reference/java/lang/String systemId)
`

Allows applications to map references to external entities into input
sources, or tell the parser it should use conventional URI resolution.


From interface `

https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler

` `
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#comment(char[],%20int,%20int)(char[] ch, int start, int length)
`

Report an XML comment anywhere in the document.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#endCDATA()()
`

Report the end of a CDATA section.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#endDTD()()
`

Report the end of DTD declarations.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#endEntity(java.lang.String)(https://developer.android.com/reference/java/lang/String name)
`

Report the end of an entity.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#startCDATA()()
`

Report the start of a CDATA section.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#startDTD(java.lang.String,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/String publicId, https://developer.android.com/reference/java/lang/String systemId)
`

Report the start of DTD declarations, if any.


`
abstract


void` `
https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#startEntity(java.lang.String)(https://developer.android.com/reference/java/lang/String name)
`

Report the beginning of some internal and external XML entities.


## Public constructors

### DefaultHandler2

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public DefaultHandler2 ()
```

Constructs a handler which ignores all parsing events.

<br />

## Public methods

### attributeDecl

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void attributeDecl (String eName, 
                String aName, 
                String type, 
                String mode, 
                String 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 />

<br />

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

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### comment

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 />

<br />

| Parameters ||
|---|---|
| `ch` | `char`: An array holding the characters in the comment. <br /> |
| `start` | `int`: The starting position in the array. <br /> |
| `length` | `int`: The number of characters to use from the array. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### elementDecl

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void elementDecl (String name, 
                String 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 />

<br />

| Parameters ||
|---|---|
| `name` | `String`: The element type name. <br /> |
| `model` | `String`: The content model as a normalized string. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### endCDATA

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void endCDATA ()
```

Report the end of a CDATA section.

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### endDTD

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 />

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### endEntity

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void endEntity (String name)
```

Report the end of an entity.

<br />

| Parameters ||
|---|---|
| `name` | `String`: The name of the entity that is ending. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### externalEntityDecl

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void externalEntityDecl (String name, 
                String publicId, 
                String 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 />

<br />

| Parameters ||
|---|---|
| `name` | `String`: The name of the entity. If it is a parameter entity, the name will begin with '%'. <br /> |
| `publicId` | `String`: The entity's public identifier, or null if none was given. <br /> |
| `systemId` | `String`: The entity's system identifier. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### getExternalSubset

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputSource getExternalSubset (String name, 
                String baseURI)
```

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

<br />

| Parameters ||
|---|---|
| `name` | `String`: Identifies the document root element. This name comes from a DOCTYPE declaration (where available) or from the actual root element. The parameter is ignored. <br /> |
| `baseURI` | `String`: 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/InputSource` | null (always). <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | Probably indicating a failure to create a new InputStream or Reader, or an illegal URL. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | Any SAX exception, possibly wrapping another exception. |

### internalEntityDecl

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void internalEntityDecl (String name, 
                String 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 />

<br />

| Parameters ||
|---|---|
| `name` | `String`: The name of the entity. If it is a parameter entity, the name will begin with '%'. <br /> |
| `value` | `String`: The replacement text of the entity. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### resolveEntity

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputSource resolveEntity (String publicId, 
                String systemId)
```

Invokes
`https://developer.android.com/reference/org/xml/sax/EntityResolver#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.

<br />

| Parameters ||
|---|---|
| `publicId` | `String`: The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied. <br /> |
| `systemId` | `String`: 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/InputSource` | An InputSource object describing the new input source. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | Probably indicating a failure to create a new InputStream or Reader, or an illegal URL. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | Any SAX exception, possibly wrapping another exception. |

### resolveEntity

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputSource resolveEntity (String name, 
                String publicId, 
                String baseURI, 
                String 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://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler#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.

<br />

| Parameters ||
|---|---|
| `name` | `String`: 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. <br /> |
| `publicId` | `String`: The public identifier of the external entity being referenced (normalized as required by the XML specification), or null if none was supplied. <br /> |
| `baseURI` | `String`: 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. <br /> |
| `systemId` | `String`: 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/InputSource` | An InputSource object describing the new input source. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | Probably indicating a failure to create a new InputStream or Reader, or an illegal URL. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | Any SAX exception, possibly wrapping another exception. |

### startCDATA

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void startCDATA ()
```

Report the start of a CDATA section.

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

<br />

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### startDTD

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void startDTD (String name, 
                String publicId, 
                String 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://developer.android.com/reference/org/xml/sax/DTDHandler` or
`https://developer.android.com/reference/org/xml/sax/ext/DeclHandler` events must appear
between the startDTD and `https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#endDTD()` events.
Declarations are assumed to belong to the internal DTD subset
unless they appear between `https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#startEntity(java.lang.String)`
and `https://developer.android.com/reference/org/xml/sax/ext/LexicalHandler#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://developer.android.com/reference/org/xml/sax/ContentHandler#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)`
event.

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String`: The document type name. <br /> |
| `publicId` | `String`: The declared public identifier for the external DTD subset, or null if none was declared. <br /> |
| `systemId` | `String`: 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.) <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |

### startEntity

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void startEntity (String 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://developer.android.com/reference/org/xml/sax/ext/DeclHandler` or
`https://developer.android.com/reference/org/xml/sax/DTDHandler` be properly ordered.

Note that skipped entities will be reported through the
`https://developer.android.com/reference/org/xml/sax/ContentHandler#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.

<br />

| Parameters ||
|---|---|
| `name` | `String`: 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\]". <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` |   |