You want to learn more about schema validation errors during unmarshaling so you can report more robust messages back to your user, receive validation failure events as they occur, and generally gain more control over the validation process.
to perform custom operations and set it into your marshaler or
unmarshaler object. Also try the
This interface defines one method:
gives you the opportunity to perform custom event handling. To use it,
you implement the interface and then register your implementation with
the marshaler or unmarshaler, which will use your handler to collect
A validation handler is not the appropriate place for modifying the XML content tree, though it might be tempting to do so. Treat your handler as a read-only operator that must return false if any fatal error or runtime exception is thrown.
For your convenience, there are two implementations of
ValidationEventHandler available in the
ValidationEventCollector. The default handler
is used if you do not set one on the un/marshaler yourself by calling
setEventHandler method. This implementation will
continue processing if it receives validation warnings, but stop
executing immediately upon notice of the first error.
During validation, ...