Specify a parser factory
By default, the xml4j xerces parser (and as a result, ifxtools.jar)
uses the non-validating XML parser. To use an alternative SAX parser
factory, run your application from the command line as follows:
% java -Djavax.xml.parsers.SAXParserFactory=new-factory
If
you are not running from the command line, the factory name must be
enclosed in double quotation marks:
% java -Djavax.xml.parsers.SAXParserFactory="new-factory"
You
can also set a system property in your code:
System.setProperty("javax.xml.parsers.SAXParserFactory", "new-factory")
In this code, new-factory is the alternative parser factory. For example, if you are using the xerces parser, then new-factory is replaced by org.apache.xerces.jaxp.SAXParserFactoryImpl.
It
is also possible to use an alternative document factory for DOM methods.
Run your application from the command line as follows:
% java -Djavax.xml.parsers.DocumentBuilderFactory=new-factory
If
you are not running from the command line, the factory name must be
enclosed in double quotation marks:
% java -Djavax.xml.parsers.DocumentBuilderFactory="new-factory"
You
can also set a system property in your code:
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "new-factory")
For example, if you are using the xerces parser, then new-factory is replaced by jorg.apache.xerces.jaxp.DocumentBuilderFactoryImpl.