Class ProviderFactory

java.lang.Object
org.simpleframework.xml.stream.ProviderFactory

final class ProviderFactory extends Object
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 Details

    • ProviderFactory

      ProviderFactory()
  • Method Details

    • getInstance

      public static Provider getInstance()
      This is used to acquire the Provider 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