org.xmlpull.v1
Class XmlPullParserFactory

java.lang.Object
|
+--org.xmlpull.v1.XmlPullParserFactory

public abstract class XmlPullParserFactory

extends java.lang.Object

This class is used to create implementations of XML Pull Parser defined in XMPULL V1 API.
The name of actual facotry class will be determied based on several parameters.
It works similar to JAXP but tailored to work in J2ME environments
(no access to system properties or file system) so name of parser class factory to use
and its class used for loading (no classloader - on J2ME no access to context class loaders)
must be passed explicitly. If no name of parser factory was passed (or is null)
it will try to find name by searching in CLASSPATH for
META-INF/services/org.xmlpull.v1.XmlPullParserFactory resource that should contain
the name of parser facotry class. If none found it will try to create a default parser
factory (if available) or throw exception.

NOTE:In J2SE or J2EE environments to get best results use
newInstance(property, classLoaderCtx)
where first argument is
System.getProperty(XmlPullParserFactory.DEFAULT_PROPERTY_NAME)
and second is Thread.getContextClassLoader().getClas() .

DEFAULT_PROPERTY_NAME
name of parser factory property that should be used for system property
or in general to retrieve parser factory clas sname from configuration
(currently name of peroperty is org.xmlpull.v1.XmlPullParserFactory)

Method Summary

boolean

getFeature(java.lang.String name)
Return the current value of the feature with given name.

boolean

isNamespaceAware()
Indicates whether or not the factory is configured to produce
parsers which are namespace aware.

boolean

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

DEFAULT_PROPERTY_NAME

public static final java.lang.String DEFAULT_PROPERTY_NAME

name of parser factory property that should be used for system property
or in general to retrieve parser factory clas sname from configuration
(currently name of peroperty is org.xmlpull.v1.XmlPullParserFactory)

newInstance

Get a new instance of a PullParserFactory used to create XML Pull Parser.

NOTE: passing classLoaderCtx is not very useful in ME
but can be useful in J2SE, J2EE or in container environments (such as servlets)
where multiple class loaders are used
(it is using Class as ClassLoader is not in ME profile).

Parameters:

classLoaderCtx - if not null it is used to find
default factory and to create instance