我正在使用一个格式化引擎,之前我使用过 saxon9he.jar,其中我使用“
private static TransformerFactory theTransformerFactory =
TransformerFactory.newInstance();
((TransformerFactoryImpl) theTransformerFactory).getConfiguration();
现在我想使用 EnterpriseEdition
saxon9ee.jar 并且我想使用 EnterpriseTransformerFactory
来获取配置。我可以用这个吗?或者我需要对引擎中 Homedition 的 EnterpriseEdition
开关进行哪些更改?
最佳答案
Saxon-EE 的 EnterpriseTransformerFactory
和 EnterpriseConfiguration
是 Saxon-HE 的 TransformerFactoryImpl
和 Configuration
的子类,因此您应该能够以完全相同的方式使用它们,而无需更改您的应用程序。当然,要获得任何好处,您需要 (a) 安装许可证文件,和/或 (b) 更改代码以利用新功能。
关于java - 使用TransformerFactory从家庭版到企业版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32843648/