2

Dear forum, what is the difference between the JDK contained

import com.sun.org.apache.xml.internal.resolver.CatalogManager;

and the one contained in the Apache Xerces project

import org.apache.xml.resolver.tools.CatalogResolver;

are there any benefits of using the latter for simple Catalog Resolving? From what I read on Wikipedia it seems clear to me there is no benefit in using the latter:

org.apache.xml.resolver.tools.CatalogResolver is used to resolve external entities to locally-cached instances. This resolver originates from Apache Xerces but is now included with the Sun Java runtime.

Anyway some XML related projects like qizx supply a seperate resolver.jar. Thanks for your help. Michael

4

1 回答 1

3

这些com.sun.org.apache.xml包本质上是已“内化”到 JRE 中的 Apache 项目的副本。您会发现很多 Apache XML 项目都可以做到这一点,包括 Xerces 和 Xalan。

在 99% 的情况下,内部的就可以了。使用这些org.apache版本的唯一原因是如果您需要最新版本,通常是为了修复错误。

于 2010-10-08T09:38:57.590 回答