jon gold wrote:
> about this time last year, i think it was mentioned that there was the
> possibility that the RI's Unmarshaller could be made to handle (skip
> over) unexpected elements when validation was turned off:
>
> https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=2951
>
> unless i'm doing something incorrectly, i don't seem to be getting this
> behavior (jaxb 1.4 in the jwsdp 1.5). was this feature ever implemented,
> or are unexpected elements still cause for failure, regardless of
> validation being disabled.
When the unmarshaller sees an unexpected element, it reports the problem
to the handler. If no user handler is installed, the default handler
takes the processing, and it just aborts the processing right there.
If you install your own ValidationEventHandler, then you can tell the
unmarshaller to continue. If you do that, the unmarshaller ignores this
element and trys to sync up with the next element.
I suspect that you haven't installed your ValidationEventHandler.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net