Package org.simpleframework.xml.stream
Class ProviderFactory
java.lang.Object
org.simpleframework.xml.stream.ProviderFactory
The
ProviderFactory
object is used to instantiate a
provider of XML parsing to the framework. This scans the classpath
for the classes required for StAX, if they are present then this
is what will be used to process XML. If however StAX can not be
used then a DOM implementation is provided. A DOM provider as a
default suits most Java profiles as it is a very common parser.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Provider
This is used to acquire theProvider
to be used to process XML documents.
-
Constructor Details
-
ProviderFactory
ProviderFactory()
-
-
Method Details
-
getInstance
This is used to acquire theProvider
to be used to process XML documents. The provider returned is determined by scanning the classpath for StAX dependencies, if they are available then the provider used is StAX otherwise it is DOM. Scanning the classpath in this manner ensures the most suitable parser is used for the host platform.- Returns:
- this returns the provider that has been instantiate
-