users@jaxb.java.net

Elements following unexpected elements are ignored

From: Gregor Koukkoullis <kou_at_gmx.de>
Date: Mon, 14 Nov 2005 14:28:48 +0100 (MET)

Hi...

I'm a happy JAXB since a few years, and I have to thank the team for this
great work.

Unfortunalty I came across a problem that I cant solve and I hope you can
help me to find a way to make it work. I'm using Java 1.4 and JAXB 1.0.4
(also tried the build jaxb-ri-20051113).

I like to read a XML file that contains elements I like to ignore. Main
reason is that a newer version of the server software contains new elements
but older client versions dont understand them and should skip and ignore
these elements.
I was always receiving a unexpected element error and parsing stopped. I
searched this mailing list and read that I should implemented a
ValidationEventHandler that returns true on handleEvent() for this error. I
did this.
The result is that this element gets now ignored and parsing continues
(YES!) but all the following valid and known elements on the same level also
get ignored and are called to be unexpected (oh no..).

Is there any way I can get it to work to just skip the unknown elements and
cleanly continue parsing the following known elements.

Thanks,
Gregor

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie