Package org.simpleframework.xml.stream
Class ProviderFactory
- java.lang.Object
-
- org.simpleframework.xml.stream.ProviderFactory
-
final class ProviderFactory extends java.lang.Object
TheProviderFactory
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:
NodeBuilder
-
-
Constructor Summary
Constructors Constructor Description ProviderFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Provider
getInstance()
This is used to acquire theProvider
to be used to process XML documents.
-
-
-
Method Detail
-
getInstance
public static Provider 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
-
-