Hi Eric,

If I'm understanding you correctly I don't think there's anything to prevent you from doing what you want. JiBX marshaller/unmarshallers generated from a binding definition only deal with a single element, but if you're writing a custom marshaller/unmarshaller I can't think of any reason you couldn't have it handle multiple elements. You could specify your marshaller/unmarshaller as handling AbstractFunction, but the actual type returned by the unmarshaller (or passed to the marshaller) could be any subclass of AbstractFunction.

Does that answer your question?

 - Dennis

EXT-Moody, Eric W wrote:

I am trying to map multiple tags to a single class. I have an AbstractFunction class, 
a small number InternalFunction types, and a large/growing number of UserFunction 
types that I can identify by package name (but I will not necessarily know the actual 
class names in advance).

So in:

 <internal-function>...</internal-function>
 <user-function>...</user-function>

Both of these elements should be handled by the mapper in AbstractFunction. I 
understand why I can't specify different marshallers/unmarshallers, but I don't see 
any obvious reason why this shouldn't be possible. The custom mapper can decide at 
runtime which object type to create when unmarshalling, and which element type to 
create when marshalling.

Do I need to use a <structure> element somehow in my binding definition? Is there a 
way to accomplish this? Perhaps this is a newbie question, but I couldn't find anything 
covering this specifically, either in the documentation or mailing list.

Thanks,
Eric Moody



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to