I'd thought this was in, but it wasn't. I added it for the beta 3c release. If the field type you reference in <structure field="itsObject"/> has a type with a known <mapping> that'll be used directly; otherwise, you'll get the <mapping> appropriate for the object or element type at runtime.

 - Dennis

Guillaume Pothier wrote:

By the way, is there a way to define a structure without specifying its type or its name, but only its field, letting JiBX determine what binding it can use according to the element name (unmarshalling) or object class (marshalling), but not according to the type of the field?
I mean, if I have this class:
class A {
Object itsObject;
}


and several mappings defined for other classes, I would like to define a mapping for class A this way:
<mapping name="a" class="a">
<structure field="itsObject"/>
</mapping>


so that my xml can contain something like <a> <any element> </a>
I guess this would be easy wih a custum marshaller/unmarshaller, but it would be nice if I could do without.







-------------------------------------------------------
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

Reply via email to