无法导入JABX XmlPath类

时间:2011-10-10 09:54:26

标签: jaxb eclipselink unmarshalling moxy

我正致力于需要解组操作的应用程序。

这是我的输入文件结构:

<root>
      <sender>senderCode</sender>
      <receiver>receiverCode</receiver>
      <document-type code="05"/>
      <date>recDate</date>
<root>

并解组我创建了三个POJO类:Root GeneralInfo和Doctype

我的问题是我可以

import org.eclipse.persistence.oxm.annotations.*;

但是我在i:

时得到“导入......无法解决”
import org.eclipse.persistence.oxm.annotations.XmlPath;

任何人都知道如何解决它?

提前致谢。

1 个答案:

答案 0 :(得分:0)

@XmlPath注释是在EclipseLink 2.1中引入的,因为您可以看到org.eclipse.persistence.oxm.annotations包而不是@XmlPath您最有可能使用EclipseLink 2.0。截至今天(2011年10月14日),当前版本是EclipseLink 2.3。

可以在此处获取EclipseLink的发布:

有关@XmlPath

的更多信息
相关问题