You can create multiple bindings and then switch between them at will. There are even examples on the JiBX site on how to do that when reading the XML. For writing XML, it's much simpler - you have different bindings for each version and choose which one you want; standard JiBX behavior, really. You may even be able to get some measure of re-use with include files, though that could be more difficult than it's worth.
-- The cake is a lie! _________________________________________________ DARIN CLARK | -----Original Message----- From: Robert Hlinka [mailto:r...@centrum.cz] Sent: Tuesday, May 31, 2011 3:02 AM To: jibx-users Subject: [jibx-users] Fwd: Remove all ABCelements from marshalled xml Formatting was wrong, so once again: Hello, I have schema where Address element is included in several parts of XML. Old version of the schema doesn't support Address element. So if I recognize that old version response is required, then I have to exclude all Address elements from resulting XML. E.g. Got from DB (addresses are always read from DB into java objects): <msg> <person ...> ... <address ... /> </person> <person ...> ... <address ... /> </person> <organization ...> ... <address ... /> </organization> <organization ...> ... <address ... /> </organization> <organization ...> ... <address ... /> </organization> <customer ...> <order ...> ... <address ... /> </order> </customer> ... </msg> if response version is less then 1.5, generated response message should be: <msg> <person ...> ... </person> <person ...> ... </person> <organization ...> ... </organization> <organization ...> ... </organization> <organization ...> ... </organization> <customer ...> <order ...> ... </order> </customer> ... </msg> Of course, I could set all address objects to null, but problem is that there is really quite large number of classes containing Address object in some level. All objects on 2nd level are optional, so it would be difficult to find if Address is defined at all in some objects. Is there any more sofisticated solution for that? Is versioning somehow supported in JiBX at all? Thanks for any suggestions. Robert ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users