i'm not sure if there is any solution to that, don't forget: the XML that you receive is actually not valid XML. it will be hard to treat JiBX to "assume" it should deal with a broken XML file...
the only solution i know is to use custom deserializers, which is not as much work as you might expect. you can define them once in your binding for all datatypes you use so it won't change your binding very much. br, günther Am 09.07.2008 um 16:49 schrieb Thomas Frieling: > Hi List! > > I have the problem that the source i am trying to read uses the > nil-attribute without defining the namespace correctly. > > <video> > <length type="integer" nil="true"/> > </video> > > Of course this throws a > java.lang.NumberFormatException: For input string: "" > when trying to read an empty-string integer element because it is not > identified as null. > > Normally the xml should look like the following, but unfortunally I > cannot change the input format. > > <program xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <video> > <length type="integer" xsi:nil="true"/> > </video> > > How can I solve this problem without creating custom parsers for all > types used besides String? > > Maybe there is an option like setNamespaceAware(false) or something > like > that? > > > Greetings from Berlin, > Thomas > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > jibx-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
