Java 我应该从哪里下载 jar 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18173731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 23:01:50  来源:igfitidea点击:

What is the jar file I should download and from where?

javaxmlparsingdom

提问by user2019510

import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.Element;
    import java.io.File;

I woud like to work with the above. so,what is jar file I should download and from where??

我想与上述工作。那么,我应该从哪里下载 jar 文件?

采纳答案by Mena

javax.xml, org.w3cand java.iopackages resides in the classes.jarfile in your JDK.

javax.xml,org.w3c并且java.io包驻留在classes.jarJDK中的文件中。

You shouldn't reference any external .jarfile as this should be automatically referenced by your editor.

您不应该引用任何外部.jar文件,因为您的编辑器应该会自动引用它。

回答by Michael Kay

Although there is an implementation of the DOM provided with the JDK,

尽管 JDK 提供了 DOM 的实现,

  1. the Xerces implementation available from Apache is better (fewer bugs)

  2. there are much better XML tree APIs available: DOM is the first and the worst, though sadly still the most popular. JDOM2 and XOM are faster and easier to use.

  1. Apache 提供的 Xerces 实现更好(错误更少)

  2. 有更好的 XML 树 API 可用:DOM 是第一个也是最差的,但遗憾的是仍然是最受欢迎的。JDOM2 和 XOM 更快、更易于使用。