0

I got an XML that I've to validate using an XSD schema, I already got the validation code if an element is missing using an handleEvent:

public boolean handleEvent(ValidationEvent event) { }
JAXBContext readStructure=JAXBContext.newInstance(Cuentas.class);
Unmarshaller jaxbUnmarshaller=readStructure.createUnmarshaller();
jaxbUnmarshaller.setSchema(schema);
jaxbUnmarshaller.setEventHandler(new MyValidationEventHandler());

All I can handle with the handleEvent are errors, Any ideas? (sorry if bad english)

  • Not sure if this would help [link](https://stackoverflow.com/questions/6006103/how-to-enable-schema-validation-so-that-jaxb-rejects-empty-element) – Daniel Ortiz Oct 28 '19 at 21:36
  • So you can handle _errors_ with handleEvent. But you want to handle something else? Please can you explain (perhaps with an example) what you want to do. – kimbert Nov 02 '19 at 21:22

0 Answers0