Java Reference
In-Depth Information
Here's how it works: perform your processing, but expect that your warnings and errors will
continue being collected as the document is parsed, and processing will complete to the end.
Once the call to validate, marshal, or unmarshal returns, invoke the
getEvents
method to
gather the collected events. They will be available as an array of
ValidationEvent
objects.