org.xmlpull.v1
public class XmlPullParserFactory extends Object
newInstance(property, classLoaderCtx)
where first argument is
System.getProperty(XmlPullParserFactory.PROPERTY_NAME)
and second is Thread.getContextClassLoader().getClass()
.
Field Summary | |
---|---|
static String | PROPERTY_NAME Name of the system or midlet property that should be used for
a system property containing a comma separated list of factory
or parser class names (value:
org.xmlpull.v1.XmlPullParserFactory). |
Method Summary | |
---|---|
boolean | getFeature(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
(it simply set feature XmlPullParser.FEATURE_PROCESS_NAMESPACES to true or false).
|
boolean | isValidating()
Indicates whether or not the factory is configured to produce parsers
which validate the XML content during parse.
|
static XmlPullParserFactory | newInstance()
Create a new instance of a PullParserFactory that can be used
to create XML pull parsers (see class description for more
details).
|
static XmlPullParserFactory | newInstance(String classNames, Class context) |
XmlPullParser | newPullParser()
Creates a new instance of a XML Pull Parser
using the currently configured factory features.
|
XmlSerializer | newSerializer()
Creates a new instance of a XML Serializer.
|
void | setFeature(String name, boolean state)
Set the features to be set when XML Pull Parser is created by this factory.
|
void | setNamespaceAware(boolean awareness)
Specifies that the parser produced by this factory will provide
support for XML namespaces.
|
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).
|
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
Returns: true if the factory is configured to produce parsers which are namespace aware; false otherwise.
Returns: true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.
Returns: a new instance of a PullParserFactory, as returned by newInstance (null, null);
Returns: A new instance of a XML Pull Parser.
Throws: XmlPullParserException if a parser cannot be created which satisfies the requested configuration.
NOTE: factory features are not used for XML Serializer.
Returns: A new instance of a XML Serializer.
Throws: XmlPullParserException if a parser cannot be created which satisfies the requested configuration.
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
Parameters: awareness true if the parser produced by this code will provide support for XML namespaces; false otherwise.
Parameters: validating - if true the parsers created by this factory must be validating.