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.



I think that if he is using a collection as he mentioned in his first post, he will not have this issue, as collections can accept objects of any type if item-type is not specified.
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