Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Protected Ctors](https://developer.android.com/reference/javax/xml/parsers/SAXParser#proctors) \| [Methods](https://developer.android.com/reference/javax/xml/parsers/SAXParser#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/javax/xml/parsers/SAXParser#inhmethods)

# SAXParser

` public abstract class SAXParser `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | javax.xml.parsers.SAXParser |

<br />

*** ** * ** ***

Defines the API that wraps an `https://developer.android.com/reference/org/xml/sax/XMLReader` implementation class. In JAXP 1.0, this class wrapped the `https://developer.android.com/reference/org/xml/sax/Parser` interface, however this interface was replaced by the `https://developer.android.com/reference/org/xml/sax/XMLReader`. For ease of transition, this class continues to support the same name and interface as well as supporting new methods. An instance of this class can be obtained from the `https://developer.android.com/reference/javax/xml/parsers/SAXParserFactory#newSAXParser()` method. Once an instance of this class is obtained, XML can be parsed from a variety of input sources. These input sources are InputStreams, Files, URLs, and SAX InputSources.

This static method creates a new factory instance based on a system property setting or uses the platform default if no property has been defined.

The system property that controls which Factory implementation to create is named `"javax.xml.parsers.SAXParserFactory"`. This property names a class that is a concrete subclass of this abstract class. If no property is defined, a platform default will be used.
As the content is parsed by the underlying parser, methods of the given `https://developer.android.com/reference/org/xml/sax/HandlerBase` or the `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler` are called.

Implementations of this class which wrap an underlying implementation can consider using the `https://developer.android.com/reference/org/xml/sax/helpers/ParserAdapter` class to initially adapt their SAX1 implementation to work under this revised class.

## Summary

| ### Protected constructors ||
|---|---|
| ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#SAXParser()() ` <br /> Protected constructor to prevent instantiation. |

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/org/xml/sax/Parser` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#getParser()() ` Returns the SAX parser that is encapsulated by the implementation of this class. |
| ` abstract https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#getProperty(java.lang.String)(https://developer.android.com/reference/java/lang/String name) ` <br /> Returns the particular property requested for in the underlying implementation of `https://developer.android.com/reference/org/xml/sax/XMLReader`. |
| ` https://developer.android.com/reference/javax/xml/validation/Schema` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#getSchema()() ` <br /> Get a reference to the the `https://developer.android.com/reference/javax/xml/validation/Schema` being used by the XML processor. |
| ` abstract https://developer.android.com/reference/org/xml/sax/XMLReader` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#getXMLReader()() ` Returns the `https://developer.android.com/reference/org/xml/sax/XMLReader` that is encapsulated by the implementation of this class. |
| ` abstract boolean` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#isNamespaceAware()() ` Indicates whether or not this parser is configured to understand namespaces. |
| ` abstract boolean` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#isValidating()() ` Indicates whether or not this parser is configured to validate XML documents. |
| ` boolean` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#isXIncludeAware()() ` <br /> Get the XInclude processing mode for this parser. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(org.xml.sax.InputSource,%20org.xml.sax.helpers.DefaultHandler)(https://developer.android.com/reference/org/xml/sax/InputSource is, https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler dh) ` Parse the content given `https://developer.android.com/reference/org/xml/sax/InputSource` as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(org.xml.sax.InputSource,%20org.xml.sax.HandlerBase)(https://developer.android.com/reference/org/xml/sax/InputSource is, https://developer.android.com/reference/org/xml/sax/HandlerBase hb) ` Parse the content given `https://developer.android.com/reference/org/xml/sax/InputSource` as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.io.InputStream,%20org.xml.sax.HandlerBase,%20java.lang.String)(https://developer.android.com/reference/java/io/InputStream is, https://developer.android.com/reference/org/xml/sax/HandlerBase hb, https://developer.android.com/reference/java/lang/String systemId) ` <br /> Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.lang.String,%20org.xml.sax.HandlerBase)(https://developer.android.com/reference/java/lang/String uri, https://developer.android.com/reference/org/xml/sax/HandlerBase hb) ` Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.io.File,%20org.xml.sax.HandlerBase)(https://developer.android.com/reference/java/io/File f, https://developer.android.com/reference/org/xml/sax/HandlerBase hb) ` Parse the content of the file specified as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.lang.String,%20org.xml.sax.helpers.DefaultHandler)(https://developer.android.com/reference/java/lang/String uri, https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler dh) ` Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.io.File,%20org.xml.sax.helpers.DefaultHandler)(https://developer.android.com/reference/java/io/File f, https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler dh) ` Parse the content of the file specified as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.io.InputStream,%20org.xml.sax.HandlerBase)(https://developer.android.com/reference/java/io/InputStream is, https://developer.android.com/reference/org/xml/sax/HandlerBase hb) ` <br /> Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.io.InputStream,%20org.xml.sax.helpers.DefaultHandler)(https://developer.android.com/reference/java/io/InputStream is, https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler dh) ` Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#parse(java.io.InputStream,%20org.xml.sax.helpers.DefaultHandler,%20java.lang.String)(https://developer.android.com/reference/java/io/InputStream is, https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler dh, https://developer.android.com/reference/java/lang/String systemId) ` Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`. |
| ` void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#reset()() ` <br /> Reset this `SAXParser` to its original configuration. |
| ` abstract void` | ` https://developer.android.com/reference/javax/xml/parsers/SAXParser#setProperty(java.lang.String,%20java.lang.Object)(https://developer.android.com/reference/java/lang/String name, https://developer.android.com/reference/java/lang/Object value) ` <br /> Sets the particular property in the underlying implementation of `https://developer.android.com/reference/org/xml/sax/XMLReader`. |

### Inherited methods

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*.

## Protected constructors

### SAXParser

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

```
protected SAXParser ()
```

<br />

Protected constructor to prevent instantiation. Use `https://developer.android.com/reference/javax/xml/parsers/SAXParserFactory#newSAXParser()`.

<br />

<br />

## Public methods

### getParser

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

```
public abstract Parser getParser ()
```

Returns the SAX parser that is encapsulated by the implementation of this class.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/Parser` | The SAX parser that is encapsulated by the implementation of this class. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

### getProperty

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

```
public abstract Object getProperty (String name)
```

<br />

Returns the particular property requested for in the underlying implementation of `https://developer.android.com/reference/org/xml/sax/XMLReader`.

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String`: The name of the property to be retrieved. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | Value of the requested property. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXNotRecognizedException` | When the underlying XMLReader does not recognize the property name. |
| `https://developer.android.com/reference/org/xml/sax/SAXNotSupportedException` | When the underlying XMLReader recognizes the property name but doesn't support the property. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/XMLReader#getProperty(java.lang.String)`

### getSchema

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

```
public Schema getSchema ()
```

<br />

Get a reference to the the `https://developer.android.com/reference/javax/xml/validation/Schema` being used by the XML processor.

If no schema is being used, `null` is returned.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/javax/xml/validation/Schema` | `https://developer.android.com/reference/javax/xml/validation/Schema` being used or `null` if none in use <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown. |

### getXMLReader

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

```
public abstract XMLReader getXMLReader ()
```

Returns the `https://developer.android.com/reference/org/xml/sax/XMLReader` that is encapsulated by the implementation of this class.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/XMLReader` | The XMLReader that is encapsulated by the implementation of this class. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

### isNamespaceAware

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

```
public abstract boolean isNamespaceAware ()
```

Indicates whether or not this parser is configured to understand namespaces.

<br />

| Returns ||
|---|---|
| `boolean` | true if this parser is configured to understand namespaces; false otherwise. <br /> |

### isValidating

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

```
public abstract boolean isValidating ()
```

Indicates whether or not this parser is configured to validate XML documents.

<br />

| Returns ||
|---|---|
| `boolean` | true if this parser is configured to validate XML documents; false otherwise. <br /> |

### isXIncludeAware

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

```
public boolean isXIncludeAware ()
```

<br />

Get the XInclude processing mode for this parser.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | the return value of the `https://developer.android.com/reference/javax/xml/parsers/SAXParserFactory#isXIncludeAware()` when this parser was created from factory. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | For backward compatibility, when implementations for earlier versions of JAXP is used, this exception will be thrown. |

**See also:**

- `https://developer.android.com/reference/javax/xml/parsers/SAXParserFactory#setXIncludeAware(boolean)`

### parse

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

```
public void parse (InputSource is, 
                DefaultHandler dh)
```

Parse the content given `https://developer.android.com/reference/org/xml/sax/InputSource` as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`.

<br />

| Parameters ||
|---|---|
| `is` | `InputSource`: The InputSource containing the content to be parsed. <br /> |
| `dh` | `DefaultHandler`: The SAX DefaultHandler to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the `InputSource` object is `null`. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (InputSource is, 
                HandlerBase hb)
```

Parse the content given `https://developer.android.com/reference/org/xml/sax/InputSource` as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. * Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0*

<br />

| Parameters ||
|---|---|
| `is` | `InputSource`: The InputSource containing the content to be parsed. <br /> |
| `hb` | `HandlerBase`: The SAX HandlerBase to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the `InputSource` object is `null`. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (InputStream is, 
                HandlerBase hb, 
                String systemId)
```

<br />

Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. * Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0*.

<br />

<br />

| Parameters ||
|---|---|
| `is` | `InputStream`: InputStream containing the content to be parsed. <br /> |
| `hb` | `HandlerBase`: The SAX HandlerBase to use. <br /> |
| `systemId` | `String`: The systemId which is needed for resolving relative URIs. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO error occurs interacting with the `InputStream`. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the given `InputStream` is `null`. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (String uri, 
                HandlerBase hb)
```

Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. * Use of the DefaultHandler version of this method is recommended as the `HandlerBase` class has been deprecated in SAX 2.0*

<br />

| Parameters ||
|---|---|
| `uri` | `String`: The location of the content to be parsed. <br /> |
| `hb` | `HandlerBase`: The SAX HandlerBase to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the uri is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (File f, 
                HandlerBase hb)
```

Parse the content of the file specified as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. * Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0*

<br />

| Parameters ||
|---|---|
| `f` | `File`: The file containing the XML to parse <br /> |
| `hb` | `HandlerBase`: The SAX HandlerBase to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the File object is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (String uri, 
                DefaultHandler dh)
```

Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`.

<br />

| Parameters ||
|---|---|
| `uri` | `String`: The location of the content to be parsed. <br /> |
| `dh` | `DefaultHandler`: The SAX DefaultHandler to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the uri is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (File f, 
                DefaultHandler dh)
```

Parse the content of the file specified as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`.

<br />

| Parameters ||
|---|---|
| `f` | `File`: The file containing the XML to parse <br /> |
| `dh` | `DefaultHandler`: The SAX DefaultHandler to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the File object is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (InputStream is, 
                HandlerBase hb)
```

<br />

Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/HandlerBase`. * Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0*.

<br />

<br />

| Parameters ||
|---|---|
| `is` | `InputStream`: InputStream containing the content to be parsed. <br /> |
| `hb` | `HandlerBase`: The SAX HandlerBase to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If an IO error occurs interacting with the `InputStream`. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the given InputStream is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If parse produces a SAX error. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (InputStream is, 
                DefaultHandler dh)
```

Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`.

<br />

| Parameters ||
|---|---|
| `is` | `InputStream`: InputStream containing the content to be parsed. <br /> |
| `dh` | `DefaultHandler`: The SAX DefaultHandler to use. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the given InputStream is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### parse

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

```
public void parse (InputStream is, 
                DefaultHandler dh, 
                String systemId)
```

Parse the content of the given `https://developer.android.com/reference/java/io/InputStream` instance as XML using the specified `https://developer.android.com/reference/org/xml/sax/helpers/DefaultHandler`.

<br />

| Parameters ||
|---|---|
| `is` | `InputStream`: InputStream containing the content to be parsed. <br /> |
| `dh` | `DefaultHandler`: The SAX DefaultHandler to use. <br /> |
| `systemId` | `String`: The systemId which is needed for resolving relative URIs. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` | If any IO errors occur. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If the given InputStream is null. |
| `https://developer.android.com/reference/org/xml/sax/SAXException` | If any SAX errors occur during processing. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/DocumentHandler`

### reset

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

```
public void reset ()
```

<br />

Reset this `SAXParser` to its original configuration.

`SAXParser` is reset to the same state as when it was created with `https://developer.android.com/reference/javax/xml/parsers/SAXParserFactory#newSAXParser()`. `reset()` is designed to allow the reuse of existing `SAXParser`s thus saving resources associated with the creation of new `SAXParser`s.

The reset `SAXParser` is not guaranteed to have the same `https://developer.android.com/reference/javax/xml/validation/Schema` `Object`, e.g. `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)`. It is guaranteed to have a functionally equal `Schema`.

<br />

<br />

### setProperty

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

```
public abstract void setProperty (String name, 
                Object value)
```

<br />

Sets the particular property in the underlying implementation of `https://developer.android.com/reference/org/xml/sax/XMLReader`. A list of the core features and properties can be found at <http://sax.sourceforge.net/?selected=get-set>.

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String`: The name of the property to be set. <br /> |
| `value` | `Object`: The value of the property to be set. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/org/xml/sax/SAXNotRecognizedException` | When the underlying XMLReader does not recognize the property name. |
| `https://developer.android.com/reference/org/xml/sax/SAXNotSupportedException` | When the underlying XMLReader recognizes the property name but doesn't support the property. |

**See also:**

- `https://developer.android.com/reference/org/xml/sax/XMLReader#setProperty(java.lang.String,%20java.lang.Object)`