I have an xml file and I want to validate it with an xsd. I'm using the Validator.java from jaxb 2.2.5 -old prj- to solve this task. During the validation, if the validator encounter an error, it kills the further validation process. I'm looking for a solution, the Validator class not to stop the validation if encounter a validation error but continue the process to show more errors in case. I want to decide from code, if the validation error is a "really" error >> I have problem with the xsd but I can't change it... Ideas?
I assume you are using unmarshal
method call of jaxb library
to get object from the xml
.
In that case, If the you have not provided valid schema document
or valid xml document
corresponding to that schema, jaxb library
will throw UnmarshalException
exception.You cannot proceed further if exception occurs while parsing xml.
you can refer
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.