How to disable DTD fetching using JAXB2.0

前端 未结 5 1884
执念已碎
执念已碎 2020-12-02 17:54

I\'m trying to use JAXB to unmashall some XML which I used xjc to create in the first place. I don\'t want to do any validation on the unmarshalling, but even though I have

5条回答
  •  再見小時候
    2020-12-02 18:21

    You can create the Unmarshaller directly from a javax.xml.transform.sax.SAXSource.

    See the example on this page: http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.6/api/javax/xml/bind/Unmarshaller.html

    Than you "only" need to provide your own URIResolver to that SAXSource

提交回复
热议问题