进行解组之前,您只需要在上设置
javax.xml.validation.Schemaon的实例
Unmarshaller。您可以指定的实现
ValidationEventHandler对
Unmarshaller赶在解组过程中出现的任何问题。
- http://docs.oracle.com/javase/7/docs/api/javax/xml/bind/Unmarshaller.html#setSchema%28javax.xml.validation.Schema%29
想要查询更多的信息
我在博客上写了更多有关此用例的信息:
- http://blog.bdoughan.com/2010/12/jaxb-and-marshalunmarshal-schema.html



