我还应该在 Java 5 还是 6 中使用 JDOM? [英] Should I still be using JDOM with Java 5 or 6?

查看:38
本文介绍了我还应该在 Java 5 还是 6 中使用 JDOM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 JDOM 进行一般 XML 解析已有很长时间了,但我觉得必须有更好的东西,或者至少更轻量级的东西,用于 Java 5 或 6.

I've been using JDOM for general XML parsing for a long time, but get the feeling that there must be something better, or at least more lightweight, for Java 5 or 6.

JDOM API 没有任何问题,但我不喜欢在我的部署中包含 Xerces.如果我只想在 XML 文件中读取或写出一个,是否有更轻量级的替代方案?

There's nothing wrong with the JDOM API, but I don't like having to include Xerces with my deployments. Is there a more lightweight alternative, if all I want to do is read in an XML file or write one out?

推荐答案

在我看来,最好的轻量级替代方案是 XOM,但 JDOM 仍然是一个非常好的 API,我认为没有理由替换它.

The best lightweight alternative is, in my opinion, XOM, but JDOM is still a very good API, and I see no reason to replace it.

它不依赖于 Xerces,但是(至少,它不需要 Apache Xerces 发行版,它与打包到 JRE 中的 Xerces 一起工作).

It doesn't have a dependency on Xerces, though (at least, it doesn't need the Apache Xerces distro, it works alongside the Xerces that's packaged into the JRE).

这篇关于我还应该在 Java 5 还是 6 中使用 JDOM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆