Venkatesh Prasad Ranganath wrote:
It sounds like you want a single binding definition that just includes <mapping> definitions for both <c> to class C and <d> to class D, each extending a common abstract mapping for interface B. Then the <mapping> for <a> just says it contains an optional <c> and an optional <d> If the document contains a <c> child the c mapping will be used; if it contains a <d> child the d mapping will be used.Dennis Sosnoski wrote:
I'm missing some information here, I think. Are you talking about separate binding definitions for these classes, or different mappings for the same class within a single binding definition?
You can define separate bindings for the combinations of A+B+C vs. A+B+D, and as long as you compile these bindings at the same time you should have no problem - A+B will be bound one way in binding1, the other way in binding2. If that's not what you're looking for please clarify and I'll see what I can suggest.
- Dennis
<a> <c/> <c/> </a>
and
<a> <d/> <d/> </a>
are the xml documents that I want to deserialize. c elements should be mapped to class C and d elements should be mapped to class D. But I am hoping multiple implementations of interface B. So, all I want to specify in A's binding is that it contains a collection of objects of type B. How can I do this in two bindings (assuming that I will be able to compile both bindings at the same time)?
This isn't an exact match, since it'd accept an <a> with no child or with both a <c> and a <d> child, but I think it's about as close as you can get at present.
- Dennis
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
