java 导入 org.apache.xml.serialize.XMLSerializer 无法解析

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13438072/
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-10-31 12:42:54  来源:igfitidea点击:

The import org.apache.xml.serialize.XMLSerializer cannot be resolved

javajdbcxerces

提问by zoe

When I try to import org.apache.xml.serialize.XMLSerializer, I got the below error msg:

当我尝试导入 org.apache.xml.serialize.XMLSerializer 时,出现以下错误消息:

 The import org.apache.xml.serialize.XMLSerializer cannot be resolved

Can anyone tell me the cause? Thanks!!

谁能告诉我原因?谢谢!!

回答by Reimeus

You are missing xercesImpl-2.9.0.jarfrom your build path. If you are using Maven, you can add the dependency:

您的构建路径中缺少xercesImpl-2.9.0.jar。如果您使用的是 Maven,则可以添加依赖项:

<dependency>
   <groupId>xerces</groupId>
   <artifactId>xercesImpl</artifactId>
   <version>2.9.0</version>
</dependency>