hi bill,
there are two ways to accomplish that:
first, if your input and output binding will be the same in each
situation, you can use different mappings by specifying the
direction="output" or direction="input" attribute in the binding
element, see
http://jibx.sourceforge.net/tutorial/binding-advanced.html
second, you can use named bindings. you can specify a name in the
binding element, and in your java code, you can specify which named
binding you want to use. this allows you to use as many different
bindings as you like or need.
see the binding definition at http://jibx.sourceforge.net/details/binding-element.html
for more details on the attribute "name". i think there is also some
more detailed explanation in the tutorial, but i couldn't find it now.
br,
günther
Am 19.11.2007 um 22:16 schrieb William Surowiec:
Hi,
I've recently started using JibX - really useful, thank you.
But, of course, I have a question. I sense there may be several ways
to accomplish what I wish to do and I would appreciate guidance on
the "best practice" way. Here is what I would like to accomplish:
I have a complex, custom Java object. I receive an xml
representation of it (actually a subset of it.) I can parse the
subset without a problem. I now wish to produce another xml
representation of it (same object) but publishing different facets
of it. Structurally the resultant xml would look different than the
input xml: meta data inserted, aggregation performed, some field
elided.
In this specific situation, it makes sense to maintain a single
object with multiple views. Is there a "best practice" jibx approach?
Thanks,
Bill
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
--
Günther Wieser
creative-it
Guglgasse 6/1/11/1
A-1110 Wien
[EMAIL PROTECTED]
http://www.creative-it.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users