22The SAX parser factory class

Configuration on Java

  • Feature ResolverFeature.SAXPARSERFACTORY_CLASS (type: String)

  • System property xml.catalog.saxParserFactoryClass

  • Property file property saxparserfactory-class

Configuration on .NET

  • This setting has no equivalent on .NET

By default, parsers are created with the XMLREADER_SUPPLIER.

This feature and the XMLREADER_SUPPLIER are different mechanisms for configuring the same underlying feature: how does the resolver get an XML parser if it needs one? (For example, for the ResolvingXMLFilter and ResolvingXMLReader classes.)

The SAXPARSERFACTORY_CLASS is initially null and the XMLREADER_SUPPLIER is used. The purpose of the SAXPARSERFACTORY_CLASS is to allow the factory to be configured with a property since the XMLREADER_SUPPLIER cannot.

If a SAXPARSERFACTORY_CLASS is specified, it will be used in favor of the default XMLREADER_SUPPLIER. If an XMLREADER_SUPPLIER is explicitly set after the configuration is initialized, it will set this feature to null and take precedence.