# XmlPullParserFactory

public class **XmlPullParserFactory** extends Object  
This class is used to create implementations of XML Pull Parser defined in XMPULL V1 API.

##### See Also

- `https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParser.html`

### Constant Summary

|---|---|---|
| String | [PROPERTY_NAME](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#PROPERTY_NAME) |   |

### Field Summary

|---|---|---|
| protected String | [classNamesLocation](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#classNamesLocation) | Unused, but we have to keep it because it's public API. |
| protected HashMap\<String, Boolean\> | [features](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#features) |   |
| protected ArrayList | [parserClasses](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#parserClasses) |   |
| protected ArrayList | [serializerClasses](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#serializerClasses) |   |

### Protected Constructor Summary

|---|---|
|   | [XmlPullParserFactory](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#XmlPullParserFactory())() Protected constructor to be called by factory implementations. |

### Public Method Summary

|---|---|
| boolean | [getFeature](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#getFeature(java.lang.String))(String name) Return the current value of the feature with given name. |
| boolean | [isNamespaceAware](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#isNamespaceAware())() Indicates whether or not the factory is configured to produce parsers which are namespace aware (it simply set feature XmlPullParser.FEATURE_PROCESS_NAMESPACES to true or false). |
| boolean | [isValidating](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#isValidating())() Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse. |
| static [XmlPullParserFactory](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html) | [newInstance](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#newInstance())() Creates a new instance of a PullParserFactory that can be used to create XML pull parsers. |
| static [XmlPullParserFactory](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html) | [newInstance](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#newInstance(java.lang.String,%20java.lang.Class))(String unused, Class unused2) Creates a factory that always returns instances of Android's built-in `https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParser.html` and `https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlSerializer.html` implementation. |
| [XmlPullParser](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParser.html) | [newPullParser](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#newPullParser())() Creates a new instance of a XML Pull Parser using the currently configured factory features. |
| [XmlSerializer](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlSerializer.html) | [newSerializer](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#newSerializer())() Creates a new instance of a XML Serializer. |
| void | [setFeature](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#setFeature(java.lang.String,%20boolean))(String name, boolean state) Set the features to be set when XML Pull Parser is created by this factory. |
| void | [setNamespaceAware](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#setNamespaceAware(boolean))(boolean awareness) Specifies that the parser produced by this factory will provide support for XML namespaces. |
| void | [setValidating](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html#setValidating(boolean))(boolean validating) Specifies that the parser produced by this factory will be validating (it simply set feature XmlPullParser.FEATURE_VALIDATION to true or false). |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| Object | clone() |
| boolean | equals(Object arg0) |
| void | finalize() |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Constants

#### public static final String
**PROPERTY_NAME**

<br />

Constant Value: "org.xmlpull.v1.XmlPullParserFactory"

## Fields

#### protected String
**classNamesLocation**

Unused, but we have to keep it because it's public API.

#### protected HashMap\<String, Boolean\>
**features**

<br />

#### protected ArrayList
**parserClasses**

<br />

#### protected ArrayList
**serializerClasses**

<br />

## Protected Constructors

#### protected
**XmlPullParserFactory**
()

Protected constructor to be called by factory implementations.

## Public Methods

#### public boolean
**getFeature**
(String name)

Return the current value of the feature with given name.

**NOTE:** factory features are not used for XML Serializer.

##### Parameters

| name | The name of feature to be retrieved. |
|---|---|

##### Returns

- The value of named feature. Unknown features are always returned as false

#### public boolean
**isNamespaceAware**
()

Indicates whether or not the factory is configured to produce
parsers which are namespace aware
(it simply set feature XmlPullParser.FEATURE_PROCESS_NAMESPACES to true or false).

##### Returns

- true if the factory is configured to produce parsers which are namespace aware; false otherwise.

#### public boolean
**isValidating**
()

Indicates whether or not the factory is configured to produce parsers
which validate the XML content during parse.

##### Returns

- true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.

#### public static [XmlPullParserFactory](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html)
**newInstance**
()

Creates a new instance of a PullParserFactory that can be used
to create XML pull parsers. The factory will always return instances
of Android's built-in `https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParser.html` and `https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlSerializer.html`.

##### Throws

| [XmlPullParserException](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserException.html) |   |
|---|---|

#### public static [XmlPullParserFactory](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserFactory.html)
**newInstance**
(String unused, Class unused2)

Creates a factory that always returns instances of Android's built-in
`https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParser.html` and `https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlSerializer.html` implementation. This
**does not** support factories capable of creating arbitrary parser
and serializer implementations. Both arguments to this method are unused.

##### Parameters

| unused |   |
| unused2 |   |
|---|---|

##### Throws

| [XmlPullParserException](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserException.html) |   |
|---|---|

#### public [XmlPullParser](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParser.html)
**newPullParser**
()

Creates a new instance of a XML Pull Parser
using the currently configured factory features.

##### Returns

- A new instance of a XML Pull Parser.

##### Throws

| [XmlPullParserException](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserException.html) |   |
|---|---|

#### public [XmlSerializer](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlSerializer.html)
**newSerializer**
()

Creates a new instance of a XML Serializer.

**NOTE:** factory features are not used for XML Serializer.

##### Returns

- A new instance of a XML Serializer.

##### Throws

| [XmlPullParserException](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserException.html) | if a parser cannot be created which satisfies the requested configuration. |
|---|---|

#### public void
**setFeature**
(String name, boolean state)

Set the features to be set when XML Pull Parser is created by this factory.

**NOTE:** factory features are not used for XML Serializer.

##### Parameters

| name | string with URI identifying feature |
| state | if true feature will be set; if false will be ignored |
|---|---|

##### Throws

| [XmlPullParserException](https://developers.google.com/j2objc/javadoc/android/reference/org/xmlpull/v1/XmlPullParserException.html) |   |
|---|---|

#### public void
**setNamespaceAware**
(boolean awareness)

Specifies that the parser produced by this factory will provide
support for XML namespaces.
By default the value of this is set to false.

##### Parameters

| awareness | true if the parser produced by this code will provide support for XML namespaces; false otherwise. |
|---|---|

#### public void
**setValidating**
(boolean validating)

Specifies that the parser produced by this factory will be validating
(it simply set feature XmlPullParser.FEATURE_VALIDATION to true or false).

By default the value of this is set to false.

##### Parameters

| validating | - if true the parsers created by this factory must be validating. |
|---|---|