Class ProviderFactory


  • final class ProviderFactory
    extends java.lang.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:
    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 the Provider to be used to process XML documents.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProviderFactory

        ProviderFactory()
    • Method Detail

      • 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