Added in API level 1

XmlPullParserFactory

open class XmlPullParserFactory
kotlin.Any
   ↳ org.xmlpull.v1.XmlPullParserFactory

This class is used to create implementations of XML Pull Parser defined in XMPULL V1 API.

Summary

Constants
static String

Protected constructors

Protected constructor to be called by factory implementations.

Public methods
open Boolean

Return the current value of the feature with given name.

open Boolean

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

open Boolean

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

open static XmlPullParserFactory!

Creates a new instance of a PullParserFactory that can be used to create XML pull parsers.

open static XmlPullParserFactory!
newInstance(unused: String!, unused2: Class<Any!>!)

Creates a factory that always returns instances of Android's built-in XmlPullParser and XmlSerializer implementation.

open XmlPullParser!

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

open XmlSerializer!

Creates a new instance of a XML Serializer.

open Unit
setFeature(name: String!, state: Boolean)

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

open Unit

Specifies that the parser produced by this factory will provide support for XML namespaces.

open Unit
setValidating(validating: Boolean)

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

Properties
String!

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

HashMap<String!, Boolean!>!

ArrayList<Any!>!

ArrayList<Any!>!

Constants

PROPERTY_NAME

Added in API level 1
static val PROPERTY_NAME: String
Value: "org.xmlpull.v1.XmlPullParserFactory"

Protected constructors

XmlPullParserFactory

Added in API level 1
protected XmlPullParserFactory()

Protected constructor to be called by factory implementations.

Public methods

getFeature

Added in API level 1
open fun getFeature(name: String!): Boolean

Return the current value of the feature with given name.

NOTE: factory features are not used for XML Serializer.

Parameters
name String!: The name of feature to be retrieved.
Return
Boolean The value of named feature. Unknown features are always returned as false

isNamespaceAware

Added in API level 1
open fun isNamespaceAware(): Boolean

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

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

isValidating

Added in API level 1
open fun isValidating(): Boolean

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

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

newInstance

Added in API level 1
open static fun newInstance(): XmlPullParserFactory!

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 XmlPullParser and XmlSerializer.

newInstance

Added in API level 1
open static fun newInstance(
    unused: String!,
    unused2: Class<Any!>!
): XmlPullParserFactory!

Creates a factory that always returns instances of Android's built-in XmlPullParser and XmlSerializer implementation. This does not support factories capable of creating arbitrary parser and serializer implementations. Both arguments to this method are unused.

newPullParser

Added in API level 1
open fun newPullParser(): XmlPullParser!

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

Return
XmlPullParser! A new instance of a XML Pull Parser.

newSerializer

Added in API level 1
open fun newSerializer(): XmlSerializer!

Creates a new instance of a XML Serializer.

NOTE: factory features are not used for XML Serializer.

Return
XmlSerializer! A new instance of a XML Serializer.
Exceptions
org.xmlpull.v1.XmlPullParserException if a parser cannot be created which satisfies the requested configuration.

setFeature

Added in API level 1
open fun setFeature(
    name: String!,
    state: Boolean
): Unit

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!: string with URI identifying feature
state Boolean: if true feature will be set; if false will be ignored

setNamespaceAware

Added in API level 1
open fun setNamespaceAware(awareness: Boolean): Unit

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 Boolean: true if the parser produced by this code will provide support for XML namespaces; false otherwise.

setValidating

Added in API level 1
open fun setValidating(validating: Boolean): Unit

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 Boolean: - if true the parsers created by this factory must be validating.

Properties

classNamesLocation

Added in API level 1
protected var classNamesLocation: String!

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

features

Added in API level 1
protected var features: HashMap<String!, Boolean!>!

parserClasses

Added in API level 1
protected var parserClasses: ArrayList<Any!>!

serializerClasses

Added in API level 1
protected var serializerClasses: ArrayList<Any!>!