相关疑难解决方法(0)

JAXB是否在内部使用SAX或DOM?

我找不到这个问题的答案,请有人告诉我

由于JAXB是更高级别的API,JAXB是否在内部使用SAX或DOM?

xml jaxb

6
推荐指数
1
解决办法
1万
查看次数

使用EclipseLink MOXy解组时忽略DTD

当尝试使用EclipseLink MOXy将一些XML解组为POJO时,我正在FileNotFoundException寻找将文档的DTD作为相对路径的地方.

Exception in thread "main" org.springframework.oxm.UnmarshallingFailureException: JAXB unmarshalling exception; nested exception is javax.xml.bind.UnmarshalException
 - with linked exception:
[java.io.FileNotFoundException: C:\Users\deejay\Documents\workspace-sts-3.0.0.RELEASE\moxy-test\ieee_idams_exchange.dtd (The system cannot find the file specified)]
    at org.springframework.oxm.jaxb.Jaxb2Marshaller.convertJaxbException(Jaxb2Marshaller.java:761)
    at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:682)
    at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:665)
    at com.mendeley.services.utility.EclipseLinkMarshaller.load(EclipseLinkMarshaller.java:29)
    at com.mendeley.MoxyTest.main(MoxyTest.java:31)
Run Code Online (Sandbox Code Playgroud)

我按照这个例子提供了"外部元数据" ,所以我不知道为什么它甚至需要一个DTD.如果我能让它忽略DTD,或者不尝试解决它,那就太好了.

java jaxb eclipselink moxy spring-oxm

4
推荐指数
1
解决办法
3612
查看次数

标签 统计

jaxb ×2

eclipselink ×1

java ×1

moxy ×1

spring-oxm ×1

xml ×1